The database convention of performing implicit conversions to resolve expressions of mixed data types is not supported for operations that include ANSI DateTime or Interval values.
To convert ANSI DateTime or Interval expressions, use the CAST function. See Teradata Vantage™ - Data Types and Literals, B035-1143.
The following restrictions apply to the values appearing in all DateTime and Interval scalar operations:
IF … | THEN … |
---|---|
two DateTime values appear in the same DateTime expression | both values must use the same type. You cannot mix DATE, TIME, and TIMESTAMP values across type. |
a DateTime and Interval values appear in the same DateTime expression | the Interval value must contain only DateTime fields that are also contained within the DateTime value. |
two Interval values appear in the same Interval expression | both values must use the same type. You cannot mix Year-Month with Day-Time intervals. |