Examples | Implicit Type Conversion | Teradata Vantage - 17.10 - Example: Implicit Type Conversion During Assignment - 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)

Consider the following tables:

CREATE TABLE T1
   (Fname VARCHAR(25)
   ,Fid   INTEGER
   ,Yrs   CHARACTER(2));
CREATE TABLE T2
   (Wname VARCHAR(25)
   ,Wid   INTEGER
   ,Age   SMALLINT);

In the following statement, Vantage implicitly converts the character string in T1.Yrs to a numeric value:

UPDATE T2 SET Age = T1.Yrs + 5;

This is not evident in the syntax of the source statement, but becomes evident when the dictionary information for tables T1 and T2 is accessed.