Data 360 SQL and Tableau Hyper API
Type Conversions
Logical Operators
CASE
COALESCE
GREATEST and LEAST
NULLIF
DID THIS ARTICLE SOLVE YOUR ISSUE?
Let us know so we can improve!
Let us know so we can improve!
NULLIFApplies to: ✅ Data 360 SQL ✅ Tableau Hyper API
Returns NULL when two values are equal.
1NULLIF(<value1>, <value2>)<value1>: The value to evaluate. Returned when the values differ from <value2>.<value2>: The value to compare against <value1>.Returns NULL if <value1> equals <value2>. Otherwise, returns <value1>.
NULLIF performs the inverse operation of a COALESCE default substitution. Use it to convert a placeholder value back to NULL.Return NULL when a value matches a known placeholder.
1SELECT NULLIF('(none)', '(none)') AS result;Returns NULL because the two values are equal. If the first value differs from (none), NULLIF returns the first value.