SET SESSION Syntax Elements (Session Temporal Qualifiers) - Advanced SQL Engine - Teradata Database

Temporal Table Support

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Published
July 2021
Language
English (United States)
Last Update
2021-07-28
dita:mapPath
bud1592002688266.ditamap
dita:ditavalPath
bud1592002688266.ditaval
dita:id
B035-1182
lifecycle
previous
Product Category
Teradata Vantage™
CURRENT VALIDTIME
Specifies that the session valid-time qualifier is current.
VALIDTIME AS OF date_timestamp_expression
Specifies that when a SELECT statement refers to a temporal table but omits a valid-time qualifier, the default behavior extracts a snapshot of the table in the valid-time dimension AS OF the date or timestamp value specified by date_timestamp_expression.

date_timestamp_expression can be a constant, scalar UDF, scalar subquery, or business calendar function that evaluates to a date or timestamp value.

VALIDTIME SEQUENCED VALIDTIME
Specifies that the session valid-time qualifier is sequenced.
NONSEQUENCED VALIDTIME
Specifies that the session valid-time qualifier is nonsequenced.
period_expression
Specifies the period of applicability for the sequenced or nonsequenced session valid-time qualifier. The period value must be a constant expression or built-in function and cannot reference any columns.
CURRENT TRANSACTIONTIME
Specifies that the session transaction-time qualifier is current.
TRANSACTIONTIME AS OF date_timestamp_expression
Specifies that when a SELECT statement refers to a temporal table but omits a transaction-time qualifier, the default behavior extracts a snapshot of the table in the transaction-time dimension AS OF the date or timestamp value specified by date_timestamp_expression.

date_timestamp_expression can be a constant, scalar UDF, scalar subquery, or business calendar function that evaluates to a date or timestamp value.

NONSEQUENCED TRANSACTIONTIME
Specifies that the session transaction-time qualifier is nonsequenced.
AS OF date_timestamp_expression
Specifies that when a SELECT statement refers to a temporal table but omits the valid-time qualifier, transaction-time qualifier, or both, the default behavior extracts a snapshot of the table in the valid-time dimension, transaction-time dimension, or both dimensions AS OF the value specified by date_timestamp_expression.

date_timestamp_expression can be a constant, scalar UDF, scalar subquery, or business calendar function that evaluates to a date or timestamp value.

ANSIQUALIFIER
This is the default for users of ANSI/ISO-compatible temporal tables and syntax.
The session temporal qualifier must be ANSIQUALIFIER in order to create ANSI-compatible temporal tables and to get ANSI-compatible database behavior for temporal queries and DML.
The session qualifier must also be ANSIQUALIFIER in order to convert existing temporal tables described in this document to ANSI-compatible temporal tables described in Teradata Vantage™ - ANSI Temporal Table Support, B035-1186. For more information on converting transaction-time tables to system-time tables, see ANSI Temporal Tables.