<dir>
with ctename as
(
select a,b,c,,ROW_NUMBER() OVER (ORDER BY ID) AS RowNumber
from...
where ...
)
select * from ctename where RowNumber BETWEEN @StartRow AND @EndRow order by RowNumber ASC
-----------------------------
->>the above query creates a table with different columns(a,b,c) including rownumber column.But the problem is i'm getting duplicate rows(same row is repeated many times).
->>I dont want to use temp table for any cause since it makes my execution time higher.
</dir>
Krishna kumar
...
Go to the complete details ...