Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 How to retrieve the rows in batches?

Author  Topic 

vkkumar
Starting Member

2 Posts

Posted - 2009-07-20 : 09:40:47
Hi again...
Suppose there is 96 records. I displayed the first 10 records in a page using TOP class. How the remaining records can be displayed. Each page must contain 10 records. For example 1-10 records in one page.11-20 in other page and so on. Is there a query for this? If so please help me in that.Thanks...

Vijay

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2009-07-20 : 09:43:48
if you are using SQL 2005 / 2008, you can make use of row_number() to perform the pagination

see http://sqlblogcasts.com/blogs/madhivanan/archive/2007/08/27/multipurpose-row-number-function.aspx


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page
   

- Advertisement -