Neoview SQL Reference Manual (R2.2)

NULLIF Function
The NULLIF function compares the value of two expressions. Both expressions must be of
comparable types. The return value is the value of the first argument when that value is not
NULL.
NULLIF(expr1, expr2)
expr1
an expression to be compared.
expr2
an expression to be compared.
The NULLIF(expr1, expr2) is equivalent to:
CASE WHEN expr1 = expr2
THEN NULL
ELSE expr1
END
NULLIF returns a NULL if both arguments are equal. The return value is the value of the first
argument when that value is not NULL.
Example of NULLIF
This function returns a null if the value is equal to 0. The return value is the value of the first
argument when that value is not NULL.
NULLIF(value,0)
NULLIF Function 377