Currently using 9i, maybe there is a change from 9 to 10?  After I responed
I went to asktom.oracle.com, Tom Kyte is a Vice President in the Oracle
Public Sector group.  I found the following, which was also published in the
September/October 2006 issue of Oracle Magazine:

http://www.oracle.com/technology/oramag/oracle/06-sep/o56asktom.html

It explains ROWNUM it's processing and Pagination with ROWNUM, which shows
the query I use... But maybe 10g breaks all the rules... Honestly, it
wouldn't surprise me.

-Kevin    

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of John
Siracusa
Sent: Tuesday, December 05, 2006 3:22 PM
To: Rose-DB-Object
Subject: Re: [RDBO] Oracle LIMIT and Paging

On 12/5/06 3:11 PM, Kevin McGrath wrote:
>> select * from (<original query>) where rownum >= X and rownum <= Y
>
> Nope.  You cannot do a rownum > or >= that way.  A BETWEEN will aslo 
> not work.  You an only do a:
> 
>  select * from (<original query>) where rownum <= Y
> 
> Using that method.

What version of Oracle are you using?  On 10g here, the form I proposed
works.

-John



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's
Techsay panel and you'll get the chance to share your opinions on IT &
business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Rose-db-object mailing list
Rose-db-object@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rose-db-object


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Rose-db-object mailing list
Rose-db-object@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rose-db-object

Reply via email to