Monday, March 12, 2012

Paging large Results in SQL 2005

lets say we have more than 100 000 rows in Table1, and we want to view each 10 rows alone.... and by pressing on a NEXT button we will see the other 10 pages....

there is 2 buttons : NEXT and PREVIOUS

so can anyone tell me how to do that in SQL 2005, and what is correctly called.

I have found a code that does use ROW_NUMBER in order to view results between 2 numbers,

example: rows between 10 and 50....
but It is not what I want, so please I need some help, thank you

By Uncle Sam

You can use the ROW_NUMBER approach to page through results. You need to vary the row number ranges depending on the page. The other approach is to use TOP logic. Please take a look at the link below for the various techniques.

http://www.aspfaq.com/show.asp?id=2120

|||

Well I've been through that problem.. not only 100 000 rows but more than 1 000 000 records with multiple table lookup.. I've try every methods available on web and I found out the solution by combining all ideas.. You can look at my blog in this link and if you have any questions just email me..

http://weblogs.sqlteam.com/randyp/archive/2005/06/23/6335.aspx

|||okay but is there any creation for a button NEXT that jumps to the next page of the results.

No comments:

Post a Comment