Example of How the Character Set is Determined for the Query - Teradata Database - Teradata Vantage NewSQL Engine

SQL Data Manipulation Language

Product
Teradata Database
Teradata Vantage NewSQL Engine
Release Number
16.20
Published
March 2019
Language
English (United States)
Last Update
2019-05-03
dita:mapPath
fbo1512081269404.ditamap
dita:ditavalPath
TD_DBS_16_20_Update1.ditaval
dita:id
B035-1146
lifecycle
previous
Product Category
Teradata Vantage™

The character set of the expression in the first SELECT statement determines the character set of the entire query. In the following example, the character set of <char_expression_1> is used as the character set for the entire query:

SELECT <char_expression_1> FROM <table_1>
UNION
SELECT <char_expression_2> FROM <table_2>;

If <char_expression_2> contains characters not included in the character set of <char_expression_1>, an error can result.

For example, if <char_expression_1> is CHARACTER SET LATIN, but <char_expression_2> is CHARACTER SET UNICODE, attempting to translate <char_expression_2> from UNICODE to LATIN results in an error if multi-byte characters are present in <char_expression_2>.