Usage Notes - Advanced SQL Engine - Teradata Database

SQL Data Types and Literals

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-22
dita:mapPath
zsn1556242031050.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1143
lifecycle
previous
Product Category
Teradata Vantage™

When converting DATE to CHAR(n) or VARCHAR(n), then n must be equal to or greater than the length of the DATE value as represented by a character string literal.

IF the target data type is … AND n is … THEN …
CHAR(n) greater than the length of the DATE value as represented by a character string literal trailing pad characters are added to pad the representation.
too small a string truncation error is returned.
VARCHAR(n) greater than the length of the DATE value as represented by a character string literal no blank padding is added to the character representation.
too small a string truncation error is returned.