Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

returing n to m rows from a query

Status
Not open for further replies.

elmo29

Programmer
Jul 28, 2000
50
GB
This may be a silly question but is there any way I can control which records I can return

i.e. I need to be able to return the first n rows and then n+1 to 2n, 2n+1 to 3n etc

is there any nice trick to return the groups in this sort of format or do I have to scroll though each record using a counter???

Thanks in advance :)
 
select top n_records * from ... John Fill
1c.bmp


ivfmd@mail.md
 
If you want to page through a record set, you can do so easily in ADO using the PageSize, PageCount and AbsolutePage properties. Don't try to page by selecting sets of records from SQL Server.

Below are some links to helpful articles.

Terry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top