17.05 - Row Partitioning a Valid-Time Table - Teradata Database

Teradata Vantage™ - Temporal Table Support

prodname
Advanced SQL Engine
Teradata Database
vrm_release
17.00
17.05
created_date
June 2020
category
Programming Reference
featnum
B035-1182-170K

To row partition a valid-time table, use the following PARTITION BY clause.

Example: Row Partitioning a Valid-Time Table

   CREATE MULTISET TABLE Policy(
      Policy_ID INTEGER,
      Customer_ID INTEGER,
      Policy_Type CHAR(2) NOT NULL,
      Policy_Details CHAR(40),
      Validity PERIOD(DATE) NOT NULL AS VALIDTIME
      )
   PRIMARY INDEX(Policy_ID)
   PARTITION BY
     CASE_N(
      END(Validity)>= CURRENT_DATE AT INTERVAL - 12:59' HOUR TO MINUTE,
                   NO CASE);