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

Teradata Vantageā„¢ - Time Series Tables and Operations

Advanced SQL Engine
Teradata Database
Release Number
Release Date
July 2021
Content Type
Programming Reference
Publication ID
English (United States)

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.