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: How to join when NULL is the common value ?

Re: How to join when NULL is the common value ?

From: Ethan Post <epost1_at_my-deja.com>
Date: Fri, 20 Oct 2000 23:58:32 GMT
Message-ID: <8sqm76$3ck$1@nnrp1.deja.com>

In article <8sqcns$rjt$1_at_nnrp1.deja.com>,   dili66_at_my-deja.com wrote:
> Hi, At a first glance it appears that when someone
> would like to join two tables over some column then
> a row with a NULL value in one of the columns will
> not be joined with a row with a NULL value in
> the other table. Do you know if there is a switch
> to allow this type of join ?
>
> Thank you.
>
> D
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>

I would use the NVL function to convert the null value to something else.

select
a.col,
b.col
from
table a,
table b
where
nvl(a.col, 'NULL') = nvl(b.col, 'NULL');

--
Ethan
http://www.freetechnicaltraining.com/people_1.htm - Homepage
http://www.gnumetrics.com - Oracle Performance Monitor
http://www.qarbon.com - Create your own tutorials!


Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Fri Oct 20 2000 - 18:58:32 CDT

Original text of this message

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