USING TIMECODE Usage Notes | Teradata Vantage - Usage Notes - Analytics Database - Teradata Vantage

Time Series Tables and Operations

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2023-10-30
dita:mapPath
tuc1628112453431.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
sfz1493079039055
lifecycle
latest
Product Category
Teradata Vantageā„¢
  • The USING TIMECODE clause must be specified after the GROUP BY TIME clause.
  • The 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 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, the 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 Vantage 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.