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.

-Kevin


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

On 12/4/06 8:09 PM, Kevin McGrath wrote:
> $qs = q[ select * from (select oquery.*, rownum oracle_rownum from (] .
>       $qs . q[) oquery where rownum <= ?) where oracle_rownum > ?];

It seems to me that the SQL constructed above is unnecessarily complex.
Won't this work just as well?

select * from (<original query>) where rownum >= X and rownum <= Y

-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