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 -> Re: Oracle Queries/Paging

Re: Oracle Queries/Paging

From: Igor Faershtein <faershtein_at_usa.net>
Date: Sat, 16 Oct 1999 14:24:26 +0400
Message-ID: <7u9nk5$8a1@komitex.komitex.ru>


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

Original text of this message

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