Conversions to Numeric Types | Data Conversion in Field Mode | Teradata Vantage - 17.10 - Conversions to Numeric Types - Advanced SQL Engine - Teradata Database

Teradata Vantageā„¢ - Data Types and Literals

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
Publication ID
B035-1143-171K
Language
English (United States)

When in Field Mode, a numeric overflow returned for character to numeric data type conversion is not treated as an error. If the result exceeds the number of digits normally reserved for the numeric data type, the result appears as a set of asterisks in the report.

For example, the character to SMALLINT conversion in the following statement results in numeric overflow because the number of digits normally reserved for a SMALLINT is five:

SELECT '100000' (SMALLINT);

The result is:

'100000'
--------
  ******

Additionally, when in Field Mode, asterisks appear in the report for conversions to numeric types involving results that do not fit the specified output format.

For example, the DATE to INTEGER conversion in the following statement results in a value that does not fit the format specified by the FORMAT phrase:

SELECT CAST (CURRENT_DATE as integer format '9999');

The result is:

Date
----
****

The same query executed in Record or Indicator Variable Mode reports an error.