Data 360 SQL and Tableau Hyper API
Type Conversions
Logical Operators
CASE
COALESCE
GREATEST and LEAST
IFF
NULLIF
NULLIFZERO
NVL and IFNULL
ZEROIFNULL
DID THIS ARTICLE SOLVE YOUR ISSUE?
Let us know so we can improve!
Let us know so we can improve!
IFFApplies to: ✅ Data 360 SQL ✅ Tableau Hyper API
Returns the first expression when condition is true and the second expression if it is false.
1iff(<condition>, <true_expr>, <false_expr>)<condition>: Boolean condition to evaluate.<true_expr>: Expression returned when condition is true.<false_expr>: Expression returned when condition is false or NULL.Returns the selected expression. Result expressions must be convertible to a common type.
<false_expr>.Select the first result when condition evaluates to true.
1SELECT iff(TRUE, 'yes', 'no') AS result;Returns yes.
Select the false result when condition is NULL.
1SELECT iff(NULL, 'yes', 'no') AS result;Returns no.