Changing data by using views that reference temporal tables
For a view that references an application-period temporal table or a bitemporal table, you can specify a period clause for an update or delete operation on the view.
About this task
Restriction: The view must not be defined
with an INSTEAD OF trigger.
Procedure
To issue a data change operation on a view that references a temporal table:
Specify a period clause for a BUSINESS_TIME period (FOR
PORTION OF BUSINESS_TIME) following the name of the target view in
an UPDATE or DELETE statement.
Example
The following example shows how you can create a view that references an application-period temporal table (att), and then specify a period clause for an update operation on the view.
CREATE VIEW v7 (col1, col2, col3)
AS SELECT coverage, bus_start, bus_end FROM att;
UPDATE v7
FOR PORTION OF BUSINESS_TIME FROM ‘2013-01-01' TO ‘2013-06-01'
SET col1 = col1 + 1.10;