I'm puzzled by this in Oracle
select case when 'hello' <> '' then 1 else 2 end from dual;
returns 2
select case when 'hello' <> 'hello' then 1 else 2 end from dual;
returns 2
however on SQL*Server
this works as expected.
I'm puzzled by this in Oracle
select case when 'hello' <> '' then 1 else 2 end from dual;
returns 2
select case when 'hello' <> 'hello' then 1 else 2 end from dual;
returns 2
however on SQL*Server
this works as expected.
Empty string in Oracle acts as null - so your comparison <> null
will be always false...
(edit proposed by igr)