Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

using rownum between

699582Oct 22 2010 — edited Oct 22 2010
Hi,

I'm trying to extract some data from a table 65000 rows at a time (to fit each extract into XLS)

This query returns just over 800,000 rows
select *
from serial_number
where site_id = 'NDC01'
My first query works fine and returns 65000 rows.
select *
from serial_number
where site_id = 'NDC01'
and rownum between '1' and '65000'
However my second query doesn't return any rows at all
select *
from serial_number
where site_id = 'NDC01'
and rownum between '65001' and '130000'
I can understand why, as the results for the second query will return 65,000 rows, therefore the rownums will be reset to between '1' and '65000'

Any ideas how I can extract the data I am looking for?


Thanks,

SM.
This post has been answered by Saubhik Banerjee on Oct 22 2010
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 19 2010
Added on Oct 22 2010
3 comments
2,580 views