using nvl for a column with char datat type...
The Entity table has 4 records with 'X' account status and 42 records with account_status as null.
select * from entity where nvl(account_status,'X') = 'X'
when I execute the above query, all the 46 records needs to be fetched but only 42 records with null account status alone is fetched.
Also when I run the below query,
select * from entity where nvl(account_status,'T') ='X'. No row is fethced.
The column account_status is char data type.
When I use same type of query with a column of number datatype it works correctly.
Will nvl work differently for a char data type column? Could somebody help me out on this? I'm not sure if I'm wrong anywhere.
vesrion of Oracle I'm using here is Oracle 10g.