17.05 - Current Transaction-Time Queries - Teradata Database

Teradata Vantage™ - Temporal Table Support

Advanced SQL Engine
Teradata Database
June 2020
Programming Reference

A query that specifies CURRENT TRANSACTIONTIME or a query that omits a temporal qualifier and the session does not set a session temporal qualifier is a current query in the transaction-time dimension if the query references a temporal table with transaction time.

A current query on a temporal table with transaction time considers only those rows in the table that are open in the transaction-time dimension. The result is a snapshot table without transaction time.

References to a transaction-time column can appear anywhere in the query that references to a non-transaction-time column can appear. A transaction-time column is treated as a conventional Period column on the selected current rows whenever it is used. Using this column in conditions can further filter the output over the current rows.

A projection list of * indicates all nontemporal columns only.

A current transaction-time query can join a table with transaction time to a table without transaction time.

The following rules apply to current transaction-time queries on transaction-time tables:
  • Current query processing is as follows:
    1. Extract the current rows of each of the transaction-time tables specified in the query and treat the query as if the current snapshot equivalent table is specified in the query. The resulting table, regardless of whether the projection list includes the transaction-time column, is a nontemporal table without the transaction-time dimension.
    2. Execute the query as if it were a conventional query that was issued on nontemporal tables.
If the query involves a bitemporal or valid-time table, refer to the following topics for additional information that applies to the valid-time dimension: