...and it starts....worst thing M$ added as a feature
Sure there is no requirement for you to use an order by...you can always rely on an arbitrary order
Worst thing? I think you give M$ too little credit for creativity. Surely they can do worse than that.
But what is your beef with it. I admit I have not played around with it, but it would appear to be a good method of handling paging.
If it's not practically useful, then it's practically useless.
Is there something similar to ROW_NUMBER() or rowid in SQL Server 2000 ?
Or is it possible to sort in descending physical order (i mean the descending order of a "select * from table" command without "order by") to use the top/top technique without having primary/unique columns ?
I would like to improve the paging functionality in a php based mssql query tool (that has to work with all tables - please don't advise me to set the primary key or add a unique column).
I have tried to convert the stored procedure to regular sql commands and the commands are very fast except when I try to view page 13,000. When I try to view high numbered pages it gets really slow. Is there any way I can combat this? again I simulated 5 million rows in my table. Thanks for any replies
also, here is the second block of code in that example:
returnpage 'select * from Orders','EmployeeID ASC, OrderDate DESC, OrderID ASC',12,31
I entered this in my program but just exchanged the values but it keeps giving me an error