Conditional Expressions
You use conditional expressions to create expressions that convert values.
The conditional expressions described in this section are building blocks for creating expressions that convert a value from one form to another.
Follow these rules:
- In
CASEstatements,ANDhas precedence overOR. - Strings must be in single quotes.
| Expression | Example | Description | Syntax |
|---|---|---|---|
|
CASE (If) |
|
Evaluates each If none of the Note: See Best Practices for using CASE statements in Analyses and Visualizations. |
|
|
CASE (Switch) |
|
Also referred to as
If none of
the If the first expression matches an expression in multiple
|
|
|
IfCase > ELSE |
- |
- |
|
|
IfCase > IFNULL |
- |
- |
|
|
IfCase > NULLIF |
- |
- |
|
|
IfCase > WHEN |
- |
- |
|
|
IfCase > CASE |
- |
- |
|
|
SwitchCase > ELSE |
- |
- |
|
|
SwitchCase >IFNULL |
- |
- |
|
|
SwitchCase > NULLIF |
- |
- |
|
|
SwitchCase > WHEN |
- |
- |
|