Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: How do I outer join with 2 columns (inner view)?
I have run it several times. If you had read my message you would have seen that I was running out of temp space.
On Mon, 02 Sep 2002 17:52:50 GMT, Daniel Morgan <dmorgan_at_exesolutions.com> wrote:
>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 Tue Sep 03 2002 - 06:43:57 CDT