• A universal browse function sounds interesting (and yes, we may have to try it!), but when you try to make a proc all things to all users, you lose the compilation benefit in most cases. You do keep in on the server (good or bad depending on your view and your needs) and the code is centralized.

    Performance on a pure execution basis is a bit different for those two solutions we have so far(and I havent forgotten that mine doesnt yet meet the spec). Running the orig solution generates about 6 times the disk reads that my solution does.

    An interesting problem.

    Andy

    This is the most recent one:

    http://www.sqlservercentral.com/forum/topic.asp?TOPIC_ID=1014&FORUM_ID=8&CAT_ID=1&Topic_Title=Selecting+the+n%27th+to+the+n%27th+%2B+x+set+of+rows&Forum_Title=T%2DSQL

    And an earlier one, a little different:

    http://www.sqlservercentral.com/forum/topic.asp?TOPIC_ID=989&FORUM_ID=8&CAT_ID=1&Topic_Title=T%2DSQL+for+%22Last+n+records%22+in+a+table&Forum_Title=T%2DSQL