Re: Warning about null and open question to Oracle
Date: 1995/06/14
Message-ID: <3rn278$leh_at_muddy.huber.com>#1/1
In article <Pine.NXT.3.90.950613090306.17269C-100000_at_iluvatar>, John Jones <john_at_iluvatar.tip.duke.edu> writes:
|> I appreciated everyone's response to this, but the majority of responses
|> have been to just wrap a nvl around everything. That is ok, but when you
|> are comparing around 50 or more columns that is a lot of typing and as a
|> programmer I look for ways to cut down on typing as much as possible. I
|> just think that NOTHING should be equal to NOTHING. I have heard that
|> other databases do this and was really just sounding off hoping Oracle
|> would do the same. Oh well, can't have everything I guess. Thanks for
|> listening.
|>
|> --------------------------------------------------------------------
|> John Jones | my views are my own.........
|> Oracle Consultant | no matter what company they are
|> john_at_iluvatar.tip.duke.edu | coming from.
|> --------------------------------------------------------------------
--
Interestingly enough, although NULL<> NULL
note that 'X'||NULL = 'X'||NULL
In fact 'X'||NULL = 'X'. You could use this to your advantage in comparing
a bunch of columns, BUT ...
Oracle warns that this may not be true in future versions.
And here's the scary part:
Oracle says we should always use NVL(string,'') when concatenating a string
that might be null, presumably in assignments as well as in comparisons)
because the definition may be changed someday. So what might it be changed to
and what might that do to existing applications?
--
============================================================
Donald A. Smith Just another of the many Don Smiths
eddas_at_huber.com on the net
Received on Wed Jun 14 1995 - 00:00:00 CEST
