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: comparing nulls

Re: comparing nulls

From: Galen Boyer <galenboyer_at_yahoo.com>
Date: 2000/07/26
Message-ID: <upuo0epbf.fsf@yahoo.com>#1/1

Galen Boyer <galenboyer_at_yahoo.com> wrote in message news:uhf9dzhg9.fsf_at_yahoo.com...

> TRY:
> select count(*) from t1,t1
> where
> (t1.a1 = t2.a2 or t1.a1 is null or t2.a2 is null)
> and (t1.b1 = t2.b2 or t1.b1 is null or t2.b2 is null)
> and ...

,----

| Yong,
| You probably meant:
|  (t1.a1 = t2.a2 or t1.a1 is null AND t2.a2 is null)
|  and (t1.b1 = t2.b2 or t1.b1 is null AND t2.b2 is null)
`----

Well, I didn't go testing the solution, but I was actually trying to allow for the fact that only one of t1.a1 of t2.a2 might be NULL.

-- 
Galen Boyer
Database Architect
Primix Solutions, www.primix.com
Received on Wed Jul 26 2000 - 00:00:00 CDT

Original text of this message

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