I posted to the list a link to an article @ oracle.com about how to do this
with oracle, and he was using subqueries...and it doesn't work properly with
ORDER BY.

http://www.oracle.com/oramag/code/asktom/q10.html

        -Nissim


> -----Original Message-----
> From: Diethelm Guallar, Gonzalo [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, August 09, 2000 9:59 AM
> To: 'Turbine'
> Subject: RE: Limiting SQL results.
> 
> 
> > So the proper syntax for the offset+limit stuff is to
> > compute 
> > 
> >    maxrownum = offset + limit;
> > 
> > Then use the computed maxrownum 
> > (i.e. 100, if offset = 81 and limit = 20) in the SQL
> > 
> >    select * from prod
> >    where rownum <= 100;
> > 
> > and simply throw away the first 80 rows.
> 
> This has the obvious problem that with these values
> 
>   offset = 1000000 (one million)
>    limit = 5
> 
> you will get 1000005 rows and throw away 1000000...
> 
> Just pointing out the obvious,
> 
> 
> -- 
> Gonzalo A. Diethelm
> [EMAIL PROTECTED]
> 
> 
> ------------------------------------------------------------
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]
> Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
> Problems?:           [EMAIL PROTECTED]
> 


------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to