I'm trying to read data using SqlDataReader
. When using SQL Server 2014 I've added the code to my query:
.
ORDER BY STATEMENT_ID ASC
OFFSET @beginRow ROWS
FETCH NEXT @offs ROWS ONLY
This works for me in SQL Server 2014 whereas in SQL Server 2008 r2 it doesn't. What is the equivalent to this operation in SQL Server 2008 R2? Is there any, or should I change my approach!?
Thanks in advance.