Legacy INSERT Examples | Teradata Vantage - Examples: Legacy INSERT Examples - Analytics Database - Teradata Vantage

Time Series Tables and Operations

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
tuc1628112453431.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
sfz1493079039055
lifecycle
latest
Product Category
Teradata Vantageā„¢

Examples: Legacy INSERT

Following are valid inserts that use the legacy column to value mapping syntax.

INSERT INTO ocean_buoy_no_seq (TD_TIMECODE, BUOYID, TEMPERATURE) VALUES (TIMESTAMP '2017-01-06 10:32:12.123456', 111, 50);
INSERT INTO ocean_buoy_no_seq (BUOYID, TEMPERATURE, TD_TIMECODE) VALUES (111, 50, TIMESTAMP '2017-01-06 10:32:12.123455');
INSERT INTO ocean_buoy_no_seq VALUES (TIMESTAMP '2017-01-06 10:39:10.123456', 111, 66);

Examples: Invalid Legacy INSERT

You cannot specify an isolated loading clause with inserts into a PTI table. This statement returns an error.

INSERT WITH CONCURRENT ISOLATED LOADING INTO ocean_buoy_seq VALUES(TIMESTAMP '2017-01-06 10:32:12.133308', 1, 444, 50);

You cannot specify default values for inserts into a PTI table. This statement returns an error.

INSERT INTO ocean_buoy_no_seq DEFAULT VALUES;

You cannot specify the TD_TIMEBUCKET column in inserts for a PTI table. This statement returns an error.

INSERT INTO ocean_buoy_no_seq (TD_TIMEBUCKET, BUOYID, TEMPERATURE, TD_TIMECODE) VALUES (123, 111, 50, TIMESTAMP '2017-01-06 10:32:12.123456');