Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: getting X rows at a time via JDBC (i.e. no cursors)
> For your problem the solution will be (as I understand your problem):
>
> select sub.*
> from
> (
> select rownum num , tab.*
> from nm_user_info tab
> where tab.user = 'joe'
> ) sub
> where sub.num between X and X+10;
>
> where X is the start-rownum
Except that this won't work, because ROWNUM is assigned based on records which meet the where clause -- since ROWNUM = 1 does not meet the where clause, no record will actually be returned.
I suggest you go back to Plan A: grabbing X records from a ResultSet, then waiting for the request for more records and grabbing X more records. Storing a ResultSet should not consume vast amounts of memory. (I'm sure you can perform a test to determine whether or not it actually does ...)
Best,
Brett Neumeier
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Fri Apr 14 2000 - 00:00:00 CDT
![]() |
![]() |