Example: Inserting Rows into a Valid-Time Table - Analytics Database - Teradata Vantage

ANSI Temporal Table Support

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2023-10-30
dita:mapPath
jqu1628112571823.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
esa1472244798285
lifecycle
latest
Product Category
Teradata Vantage™
INSERT INTO employee_valid_time VALUES 
 (1001,'Sania',’TW08’,DATE'2002-01-01',DATE'2006-12-31');
INSERT INTO employee_vt VALUES 
 (1004,'Fred',’PW12’, DATE'2001-05-01',UNTIL_CHANGED);
INSERT INTO employee_vt VALUES 
 (1002,'Ash',’TA05’,DATE'2003-01-01',DATE'2003-12-31');
INSERT INTO employee_vt VALUES 
 (1003,'SRK',’TM02’,DATE'2004-02-10',DATE'2005-02-10');
INSERT INTO employee_vt VALUES 
 (1005,'Alice',’TW10’,DATE'2004-12-01',DATE’2005-12-01’);
INSERT INTO employee_vt VALUES 
 (1005,'Alice',’PW11’,DATE'2005-12-01',UNTIL_CHANGED);
INSERT INTO cmployee_vt VALUES 
 (1010,’Mike’,’TW07’,DATE'2015-01-01',DATE'2016-12-31');
Values for the start and end columns that constitute the valid-time period must be provided in the INSERT statement. UNTIL_CHANGED is a Teradata extension to ANSI that can be used when inserting rows into valid-time tables. It resolves to the maximum system DATE or TIMESTAMP value in accordance with the data type defined for the valid-time period ending bound column.