I need to be able to select a certain range of rows from a table using SQL.
What TSQL command should I use to perform server side paging?
I am no taking about server side paging?
I want to select first 10 rows from a table and the do some calculation
cmd.commandText :="select top 10 from table "
ada.fill(dt)
for each(datarow dtr in dt.rows)
{
//calulation
}
then I want to select next 10 rows and same repeat until the end of table
Microsoft introduced ROW_NUMBER() in SQL Server 2005 to help with paging…
Use a variable for 1 and 10 to dynamically get the next set.