Period Value Constructor | Date/Time Functions & Expressions | Teradata Vantage - Period Value Constructor - Advanced SQL Engine - Teradata Database

SQL Date and Time Functions and Expressions

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-24
dita:mapPath
xmd1556127764262.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1211
lifecycle
previous
Product Category
Teradata Vantageā„¢

Initializes an instance of a Period data type.

Syntax

PERIOD (
  datetime_expression
  [, { datetime_expression | UNTIL_CHANGED | UNTIL_CLOSED } ]
)
datetime_expression
An expression that evaluates to a DATE, TIME, or TIMESTAMP value.
UNTIL_CHANGED

A DATE or TIMESTAMP value that is considered to be forever or until it is changed.

For PERIOD(DATE) types, UNTIL_CHANGED has a value of DATE '9999-12-31'.

For PERIOD(TIMESTAMP[(n)] [WITH TIME ZONE]) types, UNTIL_CHANGED has a value of TIMESTAMP '9999-12-31 23:59:59.999999 00:00'(with the precision truncated to the precision of the beginning bound and the time zone omitted if the beginning bound does not have a time zone).

UNTIL_CHANGED supports derived periods. See IS UNTIL_CHANGED/IS NOT UNTIL_CHANGED.

UNTIL_CLOSED

An ending bound for the Period value of a temporal table transaction-time column that indicates that the row is an open row.

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'.

For more information about temporal tables, see Teradata Vantageā„¢ - Temporal Table Support , B035-1182 .

UNTIL_CLOSED supports derived periods. See IS UNTIL_CLOSED/IS NOT UNTIL_CLOSED.