all groups > sql server programming > january 2004 >
You're in the

sql server programming

group:

Getting 100 rows at a time


Getting 100 rows at a time David D.
1/17/2004 9:10:15 PM
sql server programming:
What are techniques for retrieving the first 100 rows of a result set; and
then later retrieving the second 100 rows (starting the search from where
the first 100 left off).

I am doing an unindexed wildcard search "%<string>%".

How would I accomplish this from
(1) straight SQL (e.g., from the Query Analyzer), or
(2) from an ASP page using VBScript?

This sounds like a fairly common task, because I have seen datawindows and
other software packages do it. The database has a huge number of rows, so
I cannot afford to start the search over from the top for each subsequent
100 rows of result set. Can you point me to any sample code?

- David D.



Re: Getting 100 rows at a time Aaron Bertrand [MVP]
1/17/2004 9:49:05 PM
http://www.aspfaq.com/2120

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/




[quoted text, click to view]

Re: Getting 100 rows at a time David D.
1/18/2004 9:17:47 AM
Aaron,

Thanks. This is just what I was looking for.

- David

[quoted text, click to view]

Re: Getting 100 rows at a time Vlad Vissoultchev
1/18/2004 9:09:11 PM
you might fint this previous post useful:

http://groups.google.com/groups?hl=bg&lr=&ie=UTF-8&oe=UTF-8&selm=OzkQuI9%24CHA.2328%40TK2MSFTNGP10.phx.gbl&rnum=5

HTH,
</wqw>

[quoted text, click to view]

Re: Getting 100 rows at a time David D.
1/18/2004 11:03:15 PM
Thanks, Vlad.

I will also take into account considerations from that post.

- David D.

[quoted text, click to view]


AddThis Social Bookmark Button