Example: Sequenced Valid-Time Insert into a Valid-Time Table - Analytics Database - Teradata Vantage

Temporal Table Support

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
ft:locale
en-US
ft:lastEdition
2023-10-30
dita:mapPath
eud1628112402879.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
fif1472244754791
lifecycle
latest
Product Category
Teradata Vantage™

Use a sequenced valid-time insert to insert history, current, or future rows into a valid-time table. A sequenced valid-time insert is similar to a conventional insert where the valid-time column is treated as any other column in the table.

Consider the same valid-time table as in the previous example. The following statements perform sequenced valid-time inserts into the Policy table.

   SEQUENCED VALIDTIME INSERT INTO Policy
      VALUES (232540, 909234455, 'BM', 'STD-CH-344-YYY-00',
         PERIOD (DATE '1999-01-01', DATE '1999-12-31'));

   SEQUENCED VALIDTIME INSERT INTO Policy
      (Policy_ID, Customer_ID, Policy_Type, Policy_Details, Validity)
      VALUES (944540, 344567123, 'BM', 'STD-PL-332-YXY-01',
         PERIOD (DATE '2007-02-03', DATE '2008-02-02'));