Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: comparing nulls
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.comReceived on Wed Jul 26 2000 - 00:00:00 CDT
![]() |
![]() |