Paging results from an SQL query can sometimes be quite difficult. MySQL has for a long time supported ‘LIMIT x,y’ to aid this, however with Microsoft SQL it has always been a bit more difficult. With MS SQL 2005 thing are a little easier. Try the snippet below, based on the AdventureWorks sample database included with SQL 2005.
Read more