Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle Queries/Paging
I'm sorry, If you need to order first you can try the next way
select rownum , A.*
from
( select rownum rn, id,code from komioil.prim3
/*where clause*/
group by code,id, rownum /* ordering by code first, id next and the last
by rownum */
/*having clause */ ) A
/*****************/
/* where clause*/
group by rownum, a.RN,a.ID,a.CODE
having rownum >=5 and rownum <8
/*order clause */
Igor Received on Sat Oct 16 1999 - 05:24:26 CDT