PDA

View Full Version : case when


BubikolRamios
05-12-2008, 01:36 AM
both works, no errors, except the second one ignores nulls, i.e I get null when
I should not. Any explanation ?


Select case
when A is null then "foo"
else foo1
end



Select case A
when null then "foo"
else foo1
end

technica
05-12-2008, 01:57 PM
Select case A
when is null then "foo"
else foo1
end

try using this, I used 'when is null' inistead of 'when null'

Hope this helps