NULLIF
- Last Updated: January 17, 2024
- 1 minute read
- OpenEdge
- Version 12.8
- Documentation
Returns a NULL value for expression1 if
it is equal to expression2. It is useful for
converting values to NULL from applications that
use some other representation for missing or unknown data. The NULLIF scalar function
is a type of conditional expression.
Syntax
|
Notes
- This
function is not allowed in a
GROUP BYclause. - Arguments to this function cannot be query expressions.
- The
NULLIFexpression is shorthand notation for a common case that can also be represented in aCASEexpression, as shown:
|
Example
This
example uses the NULLIF scalar function to insert
a NULL value into an address column if the host‑language
variable contains a single space character:
|
Compatibility
SQL compatible