Example - Teradata Vantage NewSQL Engine - 16.20

Teradata Vantage™ Data Types and Literals

prodname
Teradata Database
Teradata Vantage NewSQL Engine
vrm_release
16.20
category
Programming Reference
featnum
B035-1143-162K
USING Ext2 (CHAR(5)) 
INSERT INTO Test2 (Col2)
VALUES (:Ext2 (DECIMAL(5), FORMAT '99999S')); 

where Ext2 contains the strings ‘5678B’ and ‘9012L’.

Because Col2 does not have an attached FORMAT phrase, a simple SELECT, such as the following example, returns the results as seen immediately following.

SELECT Col2 FROM Test2; 
   
Col2  
-------
   
 56782.
-90123.

A sign FORMAT phrase must be included in the SELECT statement in order to retrieve the values ‘5678B’ and ‘9012L’.

It is important to remember this rule when manipulating signed zoned decimal values, especially when using sophisticated facilities like subqueries.