March 23, 2010 at 2:14 pm
Hi
I want to use paging and I don't want to get so many records.
But if I use select top (100) for example, how will I get the rest of the records, split in 100 per each select query. I have seen example like this
SELECT TOP (100) OrderDate, ShipName FROM orders WHERE orderID NOT IN (SELECT TOP OFFSET OrderID FROM orders)
. But I have read and tried that Offset doesn't work in SQL Server. Is there anything else I can do?
Thanks
Fia
March 23, 2010 at 2:19 pm
Start by reading this article: http://www.sqlservercentral.com/articles/Advanced+Querying/3181/
March 23, 2010 at 7:44 pm
October 3, 2013 at 3:32 am
October 3, 2013 at 7:39 am
As an FYI, the use of OFFSET in the ORDER BY Clause would be valid for SQL Server 2012.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply