Re: Oracle Queries/Paging

From: Dmitry E. Loginov <lde_at_mpsb.moris.ru>
Date: Thu, 14 Oct 1999 16:29:31 +0300
Message-ID: <3805DABB.8F67015E_at_mpsb.moris.ru>


mlecza_at_my-deja.com wrote:
>
> Has anyone come up with a scalable solution to handle paging large
> queries? For example, if I have a web page that return a recordset of
> 2000 record - I do not want to display all 2000 records on one page.
>
In SQL try this:

select rn, col_1, col_2
(select rownum rn, col_1, col_2
from YOUR_TABLE )
[Quoted] where rn between :START_ROW and :END_ROW order by col_1

Pay attention to that u cannot use ORDER BY clause in nested select.

> It would also be nice if I did not have to run the same query (that
> comes back with 2000 records) each time they went to the next page.
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Thu Oct 14 1999 - 15:29:31 CEST

Original text of this message