17.10 - Using Another FORMAT in the SELECT Statement - 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)

To override an attached format, another FORMAT phrase is needed in the retrieval statement. Using the preceding table, one of the two following statements must be used to retrieve the numeric value:

SELECT Col1 (FORMAT '+9999') FROM Test1;

or

SELECT CAST (Col1 AS INTEGER) FROM Test1;

The result is as follows.

Col1
-----
   
-1231