Examples of Character Data in a CASE Expression: Example 4

Teradata Vantageā„¢ SQL Functions, Expressions, and Predicates

brand
Software
Teradata Vantage
prodname
Teradata Database
Teradata Vantage NewSQL Engine
vrm_release
16.20
category
Programming Reference
featnum
B035-1145-162K

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

   SELECT i, CASE
               WHEN i=1 THEN 'abc'
               WHEN i=2 THEN column_l
               ELSE 'def'
             END
   FROM table_1
   ORDER BY 1;