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 do I outer join with 2 columns (inner view)?

Re: How do I outer join with 2 columns (inner view)?

From: Daniel Morgan <dmorgan_at_exesolutions.com>
Date: Mon, 02 Sep 2002 17:52:50 GMT
Message-ID: <3D73A552.4703904D@exesolutions.com>

Don Chambers wrote:

> I have a query with an inner view and need to perform an outer join on
> this inner view. I need to join on 2 columns to ensure I have the
> correct rows. Below is the query:
>
> SELECT mdc.id
> FROM part,
> (SELECT id, code, sos
> FROM tableB) mdc
> WHERE
> part.code = mdc.code(+)
> part.sos = mdc.sos(+)
>
> I'm not sure how to do an outer join with 2 columns. I'm also not
> sure if the fact that I have an inner view will change my where
> clause.
>
> The main table (part) has about 250,000 rows. The inner view produces
> about 2000 rows. When I run the query it takes a long time then I run
> out of temp space, which is 5 gig. I'm think I'm getting a cartesian
> result set.
>
> I'm running on Oralce 9i.
>
> Can anyone help me?
>
> Thanks,
> Don

Much as I would like to answer your question I am a teacher and am going to give you the same advice I would give one of my students.

Don't waste my time asking a question like this when you can easily test it yourself.

Of course they would have to listen to that advice in front of 40 other students. But the message is the same. Testing your SQL would have taken less time than posting the question.

Daniel Morgan Received on Mon Sep 02 2002 - 12:52:50 CDT

Original text of this message

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