Re: join query

From: Gints Plivna <gints.plivna_at_gmail.com>
Date: Wed, 21 Jan 2009 17:46:09 +0200
Message-ID: <6e49b6d00901210746n77a50470idaab33b80f7bce1a_at_mail.gmail.com>



Full outer join on columns produced by rownum is overkill. Another thing rownum for each row each time might be different, so the results might be different.
I have written an article about join types http://www.gplivna.eu/papers/sql_join_types.htm which contains some nice pictures for each join type to understand more what each of them means.
This could be a starting point.

Gints Plivna
http://www.gplivna.eu

2009/1/21 Krishan Gupta <krishan.gupta_at_etcc.com>:
> My apologies, I misstated it. xx_box have 4 records as follows :-.
>
> select * from xx_box;
>
> pos_id box_id
> 2 B1
> 2 B2
> 2 B3
> 2 B4
>
> I also figured out how to get the output result I wanted. Here is the
> query :-
>
> select e.pos_id, d.case_id, e.box_id
> from
> (select rownum xc , c.* from xx_case c) d
> full outer join
> (select rownum xb , b.* from xx_box b) e on d.xc = e.xb
>
> Thanks to you all for your precious time on this.

--
http://www.freelists.org/webpage/oracle-l
Received on Wed Jan 21 2009 - 09:46:09 CST

Original text of this message