Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> SELECT paging output
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