Select a "range" of rows

  • Thread starter Thread starter Bruno
  • Start date Start date
B

Bruno

Hello,
I am having problem with a query, the query returns more than 6000 rows and
it takes a LONG time since the sql server is not local, so I would like to
use paging, but I would need to query for example, the first 100 rows, and
then from 101 to 200, 201 t o300 and so on....

is there any way to select only portions of 100? or any workaround?

I am changing the host server, but I still need to use the same sql server
for a time.

Thanks,
Bruno
 
Let me give u a simple illustration
Say, you have 6000 rows, retrieve 100 of them and keep track of the unique
identifier, next time when you want to retrieve the NEXT 100 rows, just
retrieve another 100 in which the unique identifier is greater than what you
stored the last time and then update the stored unique identifier with your
new value..
Hop you get the idea..
Do lemme know if you have more problems..
R. Thomas
 
Back
Top