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

Home -> Community -> Usenet -> c.d.o.server -> Re: Attention oracle experts. Need some help please with Selects

Re: Attention oracle experts. Need some help please with Selects

From: <chris.hulan_at_gmail.com>
Date: 27 Jun 2006 10:39:38 -0700
Message-ID: <1151429978.132918.136680@x69g2000cwx.googlegroups.com>


clinttoris_at_hotmail.com wrote:
...
> O.k experts, I need an explaination. I figured this out but not sure
> why it is working. I modified the pending syntax to read AND (pending
> is null or pending <> 3). I thought I would be more accurate by adding
> the status in that equation but I guess not.

I read this to mean you expected 'pending != 3' to also return those rows where pending is NULL? If so you forget that NULL compared to anything is always false (even NULL = NULL is false!) Thus you have to explicitly check for NULL, or use NVL(), i.e.:

AND NVL(pending,-1) <> 3

Cheers Received on Tue Jun 27 2006 - 12:39:38 CDT

Original text of this message

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