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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Fwd: Re: How to select and display 10 records at a time from a table using sql query

Re: Fwd: Re: How to select and display 10 records at a time from a table using sql query

From: sundeep maini <sundeep_maini_at_yahoo.com>
Date: Thu, 30 Aug 2001 00:04:34 -0700
Message-ID: <F001.0037C819.20010830000530@fatcity.com>

You can use the Rank () function to rank your rows based on a simple or complex criteria in a subquery or an inline view and then extract the requisite set by using a simple condition on the Rank col. Below is a simple example just to give you some idea of what is possible. You may want to take a look at some ref manual to explore this for meeting your particular requirement (Best place is Datawarehousing Guide):

SELECT keycol,

       some_other_col(s)
  FROM (SELECT keycol,

               some_other_col(s),
               RANK() OVER (ORDER BY keycol) AS
Ranking
          FROM mytable
         WHERE condition(s) 
        )

  WHERE ranking between 11 and 20; <== alter this cond. to get a different set. You can use more complex criteria in ranking/ordering your rows.      

Sundeep Maini
Consultant
Currently on Assignement at Marshfield Clinic WI mainis_at_mfldclin.edu



Do You Yahoo!?
Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger http://im.yahoo.com
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: sundeep maini
  INET: sundeep_maini_at_yahoo.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Thu Aug 30 2001 - 02:04:34 CDT

Original text of this message

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