Re: NULL comparisions
Date: Fri, 15 Oct 1999 15:18:12 +0100
Message-ID: <380737A3.F75D391D_at_itacs.strath.ac.uk>
arvind wrote:
> You can also use
>
> If Nvl(box1, 'aaa') = Nvl(box2, 'aaa') then
> .
Consider what would happen if "box1" just happened to be set to "aaa" and
box2 was null?
It all depends whether "aaa" is a possible value of "box1" or "box2", but
surely
a solution which is data independent must be more worthwhile than a half-baked
solution which will work now but introduces a token "illegal" value to the
code?
I'm seeing parallels with the programming problem of determining the
numerically
largest number in an array of numbers: the weak programmers set their target
number to be the biggest negative value and then scan the whole array updating
their biggest-so-far if they get a bigger number. The smart programmers assume
that the first number in the array is the biggest and then check from the
second
to the last element looking for a bigger value.
Data independent or what?! ;-)
Mungo
-- Mungo Henning - it's a daft name but it goes with the face... mungoh_at_itacs.strath.ac.uk.http://www.itacs.strath.ac.uk/ I speak for me, not my employer. Itacs moved premises on 4/Sep/1999 - check website for details.Received on Fri Oct 15 1999 - 16:18:12 CEST