Are there any nvl() equivalent functions in SQL?
Or something close enough to be used in the same way in certain scenarios?
UPDATE:
no if statements
no case statements
no isnull
no coalesce
select nvl (purge_date,'SODIUFOSDIUFSDOIFUDSF') from id_rec where id=36581; (expression) SODIUFOSDIUFSDOIFUDSF 1 row(s) retrieved. select isnull (purge_date,'SODIUFOSDIUFSDOIFUDSF') from id_rec where id=36581; 674: Routine (isnull) can not be resolved. Error in line 1 Near character position 8 select coalesce (purge_date,'SODIUFOSDIUFSDOIFUDSF') from id_rec where id=36581; 674: Routine (coalesce) can not be resolved. Error in line 1 Near character position 8 select decode(purge_date, NULL, '01/01/2009', purge_date) from id_rec where id=74115; 800: Corresponding types must be compatible in CASE expression. Error in line 1 Near character position 57
You seem to be using Informix.
AFAIK, there is DECODE there:
DECODE(field, NULL, 'it is null, man', field)should give you same result asNVL(field, 'it is null, man')Please post exact name and version of the RDBMS you are using.