Period Value Constructor Rules - Analytics Database - Teradata Vantage

SQL Date and Time Functions and Expressions

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2023-10-30
dita:mapPath
cpk1628111786971.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
pxz1544241488545
lifecycle
latest
Product Category
Teradata Vantageā„¢
The following rules apply to the Period value constructor:
  • The beginning bound must have a DateTime data type and, if an ending bound is specified, the data types of the beginning and ending bounds must be comparable.
  • The ending bound where the data type of the beginning bound is DATE or TIMESTAMP can be set to UNTIL_CHANGED.
  • If the ending bound is set to UNTIL_CLOSED, the following must be true:
    • The data type of the beginning bound value must be comparable with TIMESTAMP(6) WITH TIME ZONE.
    • The constructor is only valid in an assignment operation where the target column to which the result is assigned is a transaction-time column.
    • Because the only way to set the value of a transaction-time column is by using nontemporal DML, the constructor is only valid in a nontemporal DML statement.
  • The system reports an error if any of the following are true:
    • UNTIL_CHANGED is specified for the beginning bound.
    • The result beginning bound is greater than or equal to the result ending bound.
    • The data types of the beginning and ending bounds are not comparable.
    • UNTIL_CHANGED is specified for the ending bound and the data type of the beginning bound is TIME(n) [WITH TIME ZONE].
    • UNTIL_CLOSED is specified for the beginning bound.