17.10 - Example: Current Query on a Valid-Time Table - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - Temporal Table Support

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
Publication ID
B035-1182-171K
Language
English (United States)

To query a valid-time table for the rows that are valid at the current time (rows that overlap with current time), use the CURRENT VALIDTIME temporal qualifier in the SELECT statement. For example:

   CURRENT VALIDTIME
   SELECT *
   FROM Policy
   WHERE Policy_Type = 'AU';

The result is a nontemporal result set. (The result set does not include the valid-time column.)

   Policy_ID  Customer_ID  Policy_Type  Policy_Details
   ---------  -----------  -----------  -----------------
      541077    766492008  AU           STD-CH-344-YXY-00
      541145    616035020  AU           STD-CH-348-YXN-00
      541008    246824626  AU           STD-CH-345-NXY-00