Insert Data into a Sequenced Table Examples | Teradata Vantage - Examples: Inserting Data into a Sequenced Table - 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: INSERT into a Sequenced Table

Following are 5 valid inserts into the table.

INSERT INTO ocean_buoy_seq(TIMESTAMP '2017-01-06 10:32:12', 1, 111, 50);
INSERT INTO ocean_buoy_seq(TIMESTAMP '2017-01-06 10:32:12', 2, 111, 60);
INSERT INTO ocean_buoy_seq(TIMESTAMP '2017-01-06 10:34:09', 1, 111, 70);
INSERT INTO ocean_buoy_seq(TIMESTAMP '2017-01-06 10:32:12', 1, 222, 80);
INSERT INTO ocean_buoy_seq(TIMESTAMP '2017-01-06 10:32:12', 2, 222, 90);

Examples: Invalid INSERT into a Sequenced Table

The following statement returns an error because the insert TD_TIMECODE value precedes the timezero DATE '2016-01-01' in the definition of the table ocean_buoy_seq.

INSERT INTO ocean_buoy_seq(TIMESTAMP '2015-01-01 10:32:12', 1, 111, 60);
This statement returns an error because the TD_SEQNO column value is missing:
INSERT INTO ocean_buoy_seq(TIMESTAMP '2017-01-06 10:32:12.133308', , 444, 50);