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
Does anybody know how to do it better way?
You can do it (under SQL*Plus) by running
@next10ini
then
@next10
and then
/
repetitively, where next10ini.sql is :
--
-- next10ini.sql
--
-- To be called ONCE before calling repetitively next10.sql
-- (to be called