Examples of Character Data in a CASE Expression: Example 3 - Analytics Database - Teradata Vantage

SQL Functions, Expressions, and Predicates

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2024-01-12
dita:mapPath
obm1628111499646.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
kby1472250656485
lifecycle
latest
Product Category
Teradata Vantageā„¢

One THEN/ELSE expression in the following query has a Unicode column. The query is successful and the result data type is UNICODE because the CASE expression contains 1 Unicode column and all other literals can be successfully translated to Unicode.

   SELECT i, CASE
               WHEN i=1 THEN column_u
               WHEN i=2 THEN 'abc'
               WHEN i=3 THEN 8
               WHEN i=4 THEN _KanjiSJIS'4142'XC
               ELSE 10
             END
   FROM table_1
   ORDER BY 1;