17.10 - Example: Implicit Conversion of Character to Numeric - 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)

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.