NVL command with ' ' (space) as NULL
In our DB we store character NULL values as a single character blank string ' '. How does this work with the NVL command?
Example
select NVL (
(SELECT ' ' from dual)
, 'TEST') from dual;
returns ' '
select NVL (
(SELECT NULL from dual)
, 'TEST') from dual;
returns 'TEST'
So how can I get 'TEST' to come out when there is a NULL?
Thanks!
-Mike
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
PL/SQL Release 11.2.0.2.0 - Production