Home » SQL & PL/SQL » SQL & PL/SQL » Re: Retrieving records N to N+10
Re: Retrieving records N to N+10 [message #22163] Thu, 26 September 2002 08:55
Amit Chauhan
Messages: 74
Registered: July 1999
Member
Sorry, my apologies. Mike is right. I totally missed another subquery. The query will look like this :

SELECT username
FROM(
  SELECT username, DECODE(MOD(ROWNUM,10),0,ROWNUM/10,CEIL(ROWNUM/10)) PAGE_NUM
  FROM (
    SELECT username
    FROM my_table
    ORDER BY username
       )
    )
WHERE PAGE_NUM = 4000


Hope that helps
Thanks
Amit
Previous Topic: How to tune this query
Next Topic: bind balue
Goto Forum:
  


Current Time: Sun Apr 28 21:23:48 CDT 2024