16.20 - USING TIMECODE Rules and Restrictions - Teradata Database - Teradata Vantage NewSQL Engine

Teradata Vantageā„¢ Time Series Tables and Operations

Product
Teradata Database
Teradata Vantage NewSQL Engine
Release Number
16.20
Release Date
March 2019
Content Type
Programming Reference
Publication ID
B035-1208-162K
Language
English (United States)
  • The USING TIMECODE clause must be specified after the GROUP BY TIME clause.
  • The Teradata Database may infer TD_TIMECODE as the timecode column when there is a single source present anywhere in the scope of the GROUP BY TIME clause that is a PTI table, if the desired columns are not explicitly stated in the USING TIMECODE clause.
  • The Teradata Database may infer TD_SEQNO as the sequence number column when there is a single source present anywhere in the scope of the GROUP BY TIME clause that is a sequenced PTI table, if the desired columns are not explicitly stated in the USING TIMECODE clause. Note, to infer the sequence number, the source must be a sequenced PTI table.
  • Column expressions are not allowed in the USING TIMECODE clause; only column names or column aliases are allowed.
  • When the USING TIMECODE clause is not specified:
    • If there is a PTI table in the GROUP BY TIME query, then Teradata Database will infer TD_TIMECODE as the timecode column if there is only one PTI table.
    • If there is no PTI table in the GROUP BY TIME query an error is reported.
    • If there are Multiple PTI tables in the GROUP BY TIME query an error is reported.
    • Note that these restrictions apply per query block and all of Teradata rules apply when specifying columns and their sources implicitly. In particular, the USING TIMECODE clause is explicitly needed when a GROUP BY TIME clause is used in a subquery with no FROM clause.