USING TIMECODE Clause | Teradata Vantage - USING TIMECODE Clause - Advanced SQL Engine - Teradata Database

Time Series Tables and Operations

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-22
dita:mapPath
cxa1555383531762.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1208
lifecycle
previous
Product Category
Teradata Vantageā„¢

The USING TIMECODE clause designates columns to use for timecode (TD_TIMECODE or the timecode specified in the USING TIMECODE clause) and sequence number (TD_SEQNO or seqno_col) in the GROUP BY TIME queries. It is used implicitly for PTI tables but can also be specified explicitly by the user.

The USING TIMECODE clause allows you to specify which columns of the available source columns will serve as the timecode and optional sequence number for the purpose of grouping by time. If this information can be inferred (as explained in Usage Notes), the USING TIMECODE clause is not needed. If not, then any columns from any source may be specified, if they are of the correct data type, to represent the timecode and (optional) sequence number for the duration of this query. Note, you must choose carefully because using columns which do not accurately represent the timecode and optional sequence number for the source data will likely result in unexpected and potentially non-deterministic results.