Re: Peeve
Posted in 1993
Jack Parker writes: >I hate fixing a statement from: >IF a != b THEN ..... >TO >IF a != b >OR (a IS NULL AND b IS NOT NULL) >OR (a IS NOT NULL AND b IS NULL ) THEN ..... >Are there others out there with this prob? Or is it just us? Yup - this always p***ed me off too - somebody told me once that if a value is null, then this is a special case as the value as far as *logic* goes is indeterminate and you are therefore not allowed to assume that it is not necessarily unequal to anything :) Whew! >Why is it that NULL is NOT EQUAL to "xxx", but it is not NOT EQUAL >to "xxx" either? As above, 'in theory they think'. >I'm not looking for the real answer, I'm looking for the explanation >of why grunts like me have to deal with this when it's 'intuitively >obvious to the most casual observer' that NULL should not not NOT >EQUAL "xxx". I agree totally - I would have thought that it would be a *lot* better to let the programming world take care of the relatively rare cases where they *are* worried about nulls, rather than make them worry about nulls by default. This would save a bit of typing and make things a bit neater too (not that we really want that now <:). Cheers, Richard Ridley DHL Asia Pacific