A reader, July 01, 2019 - 8:48 pm UTC
using
where
NVL(field, 'no') = case (field2 = '1') then 'other' (field2 = '2') then 'no';
validate null (true)
July 02, 2019 - 4:22 am UTC
True, but I generally try to steer clear of NVL when it comes to special values. You never know when that "special" value becomes a real one and your app silently breaks.
One nice thing with decode is:
decode(x,y,1,2)
will return 1 when x=y *including* when both are null