Rules for WHEN Search Conditions - Advanced SQL Engine - Teradata Database

SQL Functions, Expressions, and Predicates

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-30
dita:mapPath
tpt1555966086716.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1145
lifecycle
previous
Product Category
Teradata Vantageā„¢

WHEN search conditions have the following properties:

  • Can take the form of any comparison operator, such as LIKE, =, or <>.
  • Can be a quantified predicate, such as ALL or ANY.
  • Can contain a scalar subquery.
  • Can contain joins of two tables.

    For example:

       SELECT CASE 
       WHEN t1.x=t2.x THEN t1.y 
       ELSE t2.y 
       END FROM t1,t2;
       
  • Cannot contain SELECT statements.