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: Select with dual-field empty

Re: Select with dual-field empty

From: DA Morgan <damorgan_at_psoug.org>
Date: Thu, 19 Oct 2006 12:43:56 -0700
Message-ID: <1161287036.655723@bubbleator.drizzle.com>


Sonnich wrote:
> Hi
>
> I havent touched oracle for some time...
>
> I want to do a select from 2 tables, where the connection between the
> tables are fields, but the row migth not exist
>
> e.g.
>
> select * from a, b where a.code=b.code(+), but like this:
>
> select * from a, b
> where a.code1=b.code1(+)
> and a.code2=b.code2(+)
>
> the point is that both code1 and 2 has to be there.
>
> Any idea how I can do this?
>
> BR
> Sonnich

WHERE a.code1 IS NOT NULL
AND a.code2 IS NOT NULL

But given that NULL <> NULL I'm not sure you actually have an issue.

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Received on Thu Oct 19 2006 - 14:43:56 CDT

Original text of this message

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