Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: [Q] Porting SQL to Oracle

Re: [Q] Porting SQL to Oracle

From: Billy Verreynne <vslabs_at_onwe.co.za>
Date: Thu, 12 Jun 2003 08:09:03 +0000
Message-ID: <bc95hp$4dj$1@ctb-nnrp2.saix.net>


andrewst wrote:

> What you say above is true ... of the way Oracle treats the empty string
> '', i.e. as synonymous with NULL. However, just because Oracle does
> something a certain way, doesn't make it correct.

Blasphemer!

> Logically, '' is not the same as NULL, any more than 0 is the same as
> NULL for a NUMBER column. '' is a value, NULL is not.

Hey, you're not allowed to wear your pointy ears to the next Trekkie Convention. Not when you make illogical statements like that.

Define what value is in between the quotes for ''.

There is nothing in there. What is nothing in DB-speak? A null. Or a manager. But seeing that we deal here with SQL, management is not a factor.

> Oracle has had to violate some of the rules for NULLs to accommodate
> this confusion, e.g. 'ABC'||NULL returns 'ABC' when it should return
> NULL (but 'ABC'||'' should return 'ABC', as it does).

Why should 'ABC'||NULL return null? Unless you a Ferengi dealing with the 66th Law of Acquisition (the one that deals with making money disappear), it makes no sense.

You are not multiplying 'ABC' with NULL. You are not dividing it. You are saying : "ADD NOTHING TO THE STRING 'ABC'"

And that is _exactly_ what Oracle is doing. It adds _nothing_ to the string and give you the string back, with nothing added to it.

> I suggest it is you that have been confused by Oracle's conflation of
> '' and NULL!

As for your thinking that '' is not the same as a NULL. That is plain _wrong_.

If it is not NULL, then you are implying that there is a value in between those quotes.

So if there is.. please show it to me. Provide me with proof that there is indeed some value in an empty string depicted as a ''.

--
Billy
Received on Thu Jun 12 2003 - 03:09:03 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US