Mimer SQL Reference Manual TOC PREV NEXT INDEX

Mimer Developer Site

www.mimer.com/developer


CASE Expression


With a case expression it is possible to specify a conditional value. Depending on the result of one or more conditional expressions the case expression can return different values.

A CASE expression can be in one of the following two forms:

Example:
 CASE WHEN col1 < 10  THEN 1
 WHEN col1 >= 10 THEN 2
 ELSE 3
 END
 

Example:
 CASE col1 WHEN 0 THEN NULL
 WHEN -1 THEN -999
 ELSE col1
 END
Rules:

See Result Data Types for a description of how the data type of the result of the CASE expression is determined.



Upright Database Technology AB
Voice: +46 18 780 92 00
Fax: +46 18 780 92 40
dbtechnology@upright.se
Mimer SQL Reference Manual TOC PREV NEXT INDEX