Example: Nonsequenced Query on a Valid-Time Table - Analytics Database - Teradata Vantage

Temporal Table Support

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
eud1628112402879.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
fif1472244754791
lifecycle
latest
Product Category
Teradata Vantage™

To query a valid-time table such that no special temporal treatment is given to the valid-time column, use the NONSEQUENCED VALIDTIME temporal qualifier in the SELECT statement. For example:

NONSEQUENCED VALIDTIME SELECT * FROM Policy;

Result:

 Policy_ID  Customer_ID  Policy_Type  Policy_Details       Policy_Term
----------  -----------  -----------  -------------------  -------------------------
    541008    246824626  AP           STD-CH-345-NXY-00     ('09/10/01', '99/12/31')
    540944    123344567  HM           STD-PL-332-YXY-00     ('07/02/03', '99/12/31')
    497201    304779902  AU           STD-CH-524-WXY-00     ('05/02/14', '06/02/14')
    541145    616035020  B            STD-CH-348-YXN-00     ('09/12/03', '10/12/01')
    497201    304779902  AU           STD-CH-524-WXY-01     ('06/02/14', '07/02/14')
    497201    304779902  AU           STD-CH-524-WXY-02     ('07/02/14', '99/12/31')
    541077    766492008  HP           STD-CH-344-YXY-00     ('09/12/21', '99/12/31')

The valid-time column, Policy_Term, is treated as a regular column with a period data type, and appears in the result set. All rows in the table are returned, even if they are history rows.