Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Need some help with ROWNUM
That did (mostly) the trick - thanks. It needs a third sort. Also, when going through the last set of results, the 26 needs to be computed such that it shows only the remaining rows for the last page. Here's the solution (not showing computation for last page - done in the app):
SELECT * FROM ( SELECT * FROM ( SELECT * FROM ( SELECT columns FROM tables WHERE join conditions, including outer join ORDER BY some columns)
In article <sntu7t022qo8dvslpufuis7uv3jsjd5tf8_at_4ax.com>,
Doug C <dcowles_at_i84.net> wrote:
> Rather than running it twice, how about running it once with
> select * from
> (
> select * from
> ((
> SELECT columns
> FROM tables
> WHERE join conditions, including outer join
> ORDER BY some columns
> )
> WHERE ROWNUM < 1026
> )
> ORDER IT BACKWARDS
> )
> WHERE ROWNUM < 26
>
Sent via Deja.com
http://www.deja.com/
Received on Tue Feb 06 2001 - 07:50:46 CST