Range of values for TD_TIMECODE and TD_SEQNO Columns Example | Teradata Vantage - 17.00 - Example: Get the Valid Range of Values for the TD_TIMECODE and TD_SEQNO Columns - Teradata Database

Teradata Vantageā„¢ - Time Series Tables and Operations

prodname
Advanced SQL Engine
Teradata Database
vrm_release
17.00
created_date
June 2020
category
Programming Reference
featnum
B035-1208-170K
Create table MyDB.ocean_buoy (
TD_TIMEBUCKET BIGINT NOT NULL GENERATED SYSTEM TIMECOLUMN,
TD_TIMECODE TIMESTAMP(6) NOT NULL GENERATED TIMECOLUMN,
TD_SEQNO INTEGER NOT NULL GENERATED TIMECOLUMN,
BuoyID INTEGER,
Temperature INTEGER NOT NULL)
PRIMARY TIME INDEX (TIMESTAMP(6), DATE '2016-01-01', HOURS(1), SEQUENCED);
 
exec DBC.TD_TIMESERIES_RANGE('MyDB.ocean_buoy');
 
TD_TIMECODE_RANGE 
----------------------------------------------------                                                                                        
TD_TIMECODE  BETWEEN TIMESTAMP '2016-01-0100:00:00.000000+00:00' AND
TIMESTAMP '2030-08-1214:23:21.842737+00:00'
                                                                                                          
TD_SEQNO_RANGE 
----------------------------------------------------  
TD_SEQNO  BETWEEN 1  AND 20000
 
-- you can specify the table name in the macro and will get the same output as above example.
 
exec DBC.TD_TIMESERIES_RANGE('ocean_buoy');