Example: Implicit Conversion of Character to Numeric - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
ft:locale
en-US
ft:lastEdition
2024-12-11
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905

The INSERT statement in the following example implicitly converts the character data type to the target numeric data type:

CREATE TABLE t1 
(f1 DECIMAL(10,2) FORMAT 'G-U(9)D9(2)');
   
INSERT t1 ('USD12,345,678.90');

If a column definition in a CREATE TABLE statement does not specify a FORMAT phrase for the data type, the column uses the corresponding data type default format as defined in the specification for data formatting (SDF) file.