17.10 - Rules - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL Date and Time Functions and Expressions

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
Publication ID
B035-1211-171K
Language
English (United States)
  • When you specify two DateTime types, they must be comparable.
  • When you specify two Period types, including derived periods, they must be comparable.
  • If you specify a Period type for either one or both time periods, the Period expression must not include an explicit NULL.
  • If the first columns of each left and right time periods are DateTime types, they must have the same data type: both DATE, both TIME, or both TIMESTAMP.
  • If only one time period is a Period type, the first column of the other time period must have the same data type as the element type of the Period.
  • If neither time period is a Period type, then the second column of each left and right time period must either be the same DateTime type as its corresponding first column or it must be an Interval type that involves only DateTime fields where the precision is such that its value can be added to that of the corresponding DateTime type.