Converting Transaction-Time Tables to ANSI System-Versioned System-Time Tables - Advanced SQL Engine - Teradata Database

Temporal Table Support

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-23
dita:mapPath
cjo1556732840654.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1182
lifecycle
previous
Product Category
Teradata Vantage™

Teradata valid-time tables qualify as ANSI application-time temporal tables, if they are defined using a valid-time derived period column and have no temporal constraints. These tables are ANSI compliant without modifications.

Teradata transaction-time tables are analogous to ANSI system-versioned system-time temporal tables, but must be converted to system-versioned system-time tables in order to be used with ANSI-compliant temporal SQL. For sites that have implemented transaction-time tables, this section provides three methods to convert transaction-time tables to system-time tables. Teradata recommends contacting your Teradata representative for help with this process.

Although Teradata s original temporal SQL that is used to qualify temporal queries and modifications does operate on Teradata s ANSI temporal tables, it is not ANSI-compliant SQL.

In order to use ANSI temporal tables on systems that used temporal tables prior to Teradata Database 15.0, the session temporal qualifier must be set to ANSIQUALIFIER. This is normally set appropriately by Teradata personnel. ANSIQUALIFIER changes the SQL behavior with respect to default temporal qualifiers such that unqualified queries and modifications of valid-time tables act as nonsequenced.

You can check the session temporal qualifier setting by looking at the Temporal Qualifier field of the output of the HELP SESSION statement. For more information on HELP SESSION, see Teradata Vantage™ - SQL Data Definition Language Syntax and Examples, B035-1144.

For more information on session temporal qualifiers, see SET SESSION (Session Temporal Qualifiers).