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

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

From: Don Chambers <dchamber_at_mindspring.com>
Date: Sat, 31 Aug 2002 22:55:29 GMT
Message-ID: <gph2nusf74t76f3kfn3rj56qfvcs6ufmnu@4ax.com>


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 Received on Sat Aug 31 2002 - 17:55:29 CDT

Original text of this message

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