I have a solution that I've been developing that allows me to apply
paging to just about any allowed query. It appears to be just as
efficient as other methods I have discussed, however I have a need to
know the record count, which tends to slow things down.
I use it as follows:
DECLARE RowCount int
exec usp_ExecSqlWithPaging N'SELECT * FROM
-It uses the odbc cursor stored procs
-It uses a select into to create the output table.
-While it can handle most queries (although I have not thoroughly
tested it), you must have unique ...