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: Weird Query

Re: Weird Query

From: Maxim Demenko <mdemenko_at_arcor.de>
Date: Mon, 01 Aug 2005 16:17:35 +0200
Message-ID: <42ee3013$0$6980$9b4e6d93@newsread2.arcor-online.net>


Marian Aldenhövel schrieb:
> Hi,
>

>> It is very simply: WHERE column IS NOT NULL
>> Nothing more.

>
>
> And it does work fine.
>
>> There is *NO* distiction in Oracle

>
>
> (between NULL and an empty string)
>
> Which makes IS NOT NULL the safe choice. I was confused because
> other systems do make a distinction here.
There are indeed a lot of "templates" implemented in IT world. It means, if you have worked on HP-UX, you probably will be able to handle intuitiv on Linux and do the right things , if you write C++, you can read Java without to learn it and so on (one of my friends said "the life itself is copy'n'paste process"). But often that can be a trap and then only the right way is to read the manuals. (Which is of course always recommended , but very time expensive ). Just for the record:
> A numeric zero is still different from a NULL value in Oracle
> is it?

I'm pretty sure, now you can easily build the test, to proof it.
>
>> It is wrong expectation. You can blindly substitute '' by NULL, in 
>> that case you get 2 WHERE conditions
>> WHERE "PP_LOCK"=NULL
>> and
>> WHERE "PP_LOCK"<>NULL
>> both are wrong

>
>
> I would never have tried these. I _know_ they are wrong :-).
>
> Ciao, MM

Best regards

Maxim Received on Mon Aug 01 2005 - 09:17:35 CDT

Original text of this message

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