Has anyone actually tried this example? I have and cannot seem to get it to work. Here's the error I get:
Server: Msg 156, Level 15, State 1, Line 8
Incorrect syntax near the keyword 'top'.
So, alas, I'm back to my starting point for paging records. I initially thought I could use the TOP clause in conjunction with a user-defined variable number to return 10 records, 20, 100,...
The only difference I see in this example and what I originally came up with was the parenthesis around the variable, so I thought I hit the holy grail with this article. I guess not. Perhaps there's a SQL Server config setting that I need to dig up?