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

Home -> Community -> Usenet -> c.d.o.server -> SELECT paging output

SELECT paging output

From: Antonio Storino <storino_at_cibs.sns.it>
Date: 1998/11/29
Message-ID: <73sa63$ru1$1@pisanino.unipi.it>#1/1

Hello,
I need to obtain records from an ordered (group by) select starting from a low bound row num and limited to a hupper bound number. I need to select es. records from my select ranging from the 40th to the 100th record into.

I tried a query like

	SELECT fn, id
	FROM   (
			SELECT employee_id id,
				   name 	   fn,
				   rownum      rn 
			FROM   employee_db
			WHERE  age < 33
			)
	WHERE rn > 40 and rn < 100

and it seems to works fine. But I can't do an ORDER BY on the nested SELECT, but I need an order.

Probably will be useful to select into a temporary table, group by on it and then select rows also using rownum facility. But I am not sure this is the better answe to the problem.

Any help?

Thank you,
Antonio Storino Received on Sun Nov 29 1998 - 00:00:00 CST

Original text of this message

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