USING TIMECODE Clause | Teradata Vantage - 17.00 - USING TIMECODE Clause - Teradata Database

Teradata Vantageā„¢ - Time Series Tables and Operations

Advanced SQL Engine
Teradata Database
June 2020
Programming Reference

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.