Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> ROWNUM Query for multi table joins

ROWNUM Query for multi table joins

From: Ritu <riturishi_at_hotmail.com>
Date: 4 May 2002 05:34:42 -0700
Message-ID: <8cbe1b7c.0205040434.5a461d3d@posting.google.com>


I am looking for selectively retrieving reults from a query for a multi table join iteratively like

  1. ROWNUM BETWEEN 25 AND 50
  2. ROWNUM BETWEEN 50 AND 100
And so on. I found this query from a newsgroup thread

select a.rn, a.user, a.email from

   (select rownum rn, user, email from clients) a where a.rn between 40 and 100

which works fine for a single table.

Any ideas of how to map / translate it to a multitable join. The Join statement will be something (pseudo code )like

SELECT A.Name, B.Address
FROM A , B
WHERE A.ID = B.A_ID
AND A.ID = 124
ORDER BY A.Name Asc

Let us assume that this query fetches 500 records.. how can we do it iteratively in ranges of 25 records.

Any help will be greatly appreciated.

Thanks
RR Received on Sat May 04 2002 - 07:34:42 CDT

Original text of this message

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