This is an old revision of the document!


DRAFT

Omnidex SQL Function: CASE

Description

The CASE function handles simple IF - THEN - ELSE logic at a select-item level. The WHEN conditions are evaluated in order until a condition proves TRUE, at which point the THEN expression is executed. All of the THEN expressions in a CASE statement must be of the same data type: numeric, character, or date.

Syntax

CASE
    WHEN condition_expression THEN scalar_expression
    ELSE scalar_expression
END

Example

Example 1

Example 2

 
Back to top
dev/sql/functions/case.1259965209.txt.gz ยท Last modified: 2016/06/28 22:38 (external edit)