Re: Oracle Queries/Paging

From: <mlecza_at_my-deja.com>
Date: Thu, 14 Oct 1999 17:43:23 GMT
Message-ID: <7u54nn$urt$1_at_nnrp1.deja.com>


[Quoted] Thanx for the reply

Interesting suggestion but we would need the flexibility to order the nested query (if only rownum's were assigned after the ORDER BY)

In article <3805DABB.8F67015E_at_mpsb.moris.ru>,   "Dmitry E. Loginov" <lde_at_mpsb.moris.ru> wrote:
>
>
> 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 )
> 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.
>

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Thu Oct 14 1999 - 19:43:23 CEST

Original text of this message