UNTIL_CHANGED and UNTIL_CLOSED | Temporal Table Support | Teradata Vantage - UNTIL_CHANGED and UNTIL_CLOSED - 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™
UNTIL_CHANGED and UNTIL_CLOSED are special values that represent the ending bound of periods for which the duration is indefinite, forever, or for which the end is an unspecified and unknown time in the future when the row will be changed. They are used in some circumstances when a new row is inserted into a temporal table:
  • All new rows that have transaction-time columns are assigned transaction-time periods with end bounds of UNTIL_CLOSED. UNTIL_CLOSED is only associated with transaction-time columns.
  • New rows that have valid-time columns can be assigned valid-time periods with end bounds of UNTIL_CHANGED to represent that the information in the row is valid indefinitely.

UNTIL_CLOSED has a data type of TIMESTAMP(6) WITH TIME ZONE and a value of TIMESTAMP '9999-12-31 23:59:59.999999+00:00'.

The value of UNTIL_CHANGED depends on the data type and precision of the valid-time column. If the type is PERIOD(DATE), UNTIL_CHANGED is the value DATE '9999-12-31'. If the type is PERIOD(TIMESTAMP), UNTIL_CHANGED is the value of TIMESTAMP '9999-12-31 23:59:59.999999+00:00', with precision and time zone matching that specified for the valid-time data type.

For more information on UNTIL_CHANGED and UNTIL_CLOSED, see the discussion of Period data types in Teradata Vantage™ - Data Types and Literals, B035-1143.