ADD PERIOD FOR - Advanced SQL Engine - Teradata Database

SQL Data Definition Language Syntax and Examples

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
Published
January 2021
Language
English (United States)
Last Update
2021-01-22
dita:mapPath
ncd1596241368722.ditamap
dita:ditavalPath
hoy1596145193032.ditaval
dita:id
B035-1144
lifecycle
previous
Product Category
Teradata Vantage™

A derived period column.


A DATE or timestamp column can be part of only one derived period column definition and can only be used as the start of the period or end of the period, not both. The data type of begin and end columns in a derived period column must match, including the same properties, the same DATE or timestamp data type, and identical format column attribute.


A table can have more than one derived period column. For each derived period column you add, the maximum limit of 2048 non-derived period columns is reduced by one. You cannot change the NOT NULL attribute, if specified, of the begin and end columns in a derived period column.

A derived period column can only include a period arithmetic operation in a WHERE or ON clause.

A derived period column cannot be:
  • Projected
  • Part of a primary or secondary index
  • Specified as part of a PARTITION BY COLUMN clause
period_name
Name of the derived period column. period_name cannot match the name of any other column in the table.
period_begin_column
The DATE or timestamp column to use as the start of the period.
period_end_column
The DATE or timestamp column to use as the end of the period.
You can specify UNTIL_CHANGED.