String Constants | SQL External Routine Programming | Teradata Vantage - String Constants - Advanced SQL Engine - Teradata Database

SQL External Routine Programming

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

Teradata Database converts string constants as follows.

IF a UDF is passed this constant value … THEN Teradata uses this data type to determine the precedence order …
String in apostrophes VARCHAR
Graphic string in apostrophes VARCHAR CHARACTER SET GRAPHIC

Teradata Database does not implicitly convert character string constants that represent numeric values to numeric types unless they are part of an expression. For example, the string constant '1024' remains a character string. However, in an expression such as '1024' - 1, Teradata does convert the character string to a REAL, according to Teradata implicit conversion rules.

For more information on implicit type conversion rules, see Teradata Vantage™ - Data Types and Literals, B035-1143.