|
Re: I want to join two tables by row number, how do I do this? [message #372623 is a reply to message #372622] |
Wed, 28 February 2001 16:20 |
Madhav Kasojjala
Messages: 42 Registered: November 2000
|
Member |
|
|
Hi Dean,
here's how you can do
You need to get rownums first to do this job and hence Select has to be executed so that the SQL Area has rownums indexed by Oracle Engine.
So
Select a.*, b.*
from
(select rownum sno_a, col1,col2.... from table_1 where .....) a,
(select rownum sno_b, col1,col2.... from table_1
where.....) b
where a.sno_a = b.sno_b
will work as you have already 2 result sets created through in-line views coming from "from clause".
Hope that helps
Madhav
|
|
|