IFEMPTY (exp1, exp2)

If exp1 is empty (white space) or null, exp2 is returned, otherwise exp1 is returned.  The possible data type or type of exp2 must be compatible with the data type of exp1.

 

Example:

SELECT IFEMPTY( NULL , 456) return 456

or

SELECT IFEMPTY(123, 456) return 123

or

SELECT IFEMPTY('', 'ABC') return ABC