Posted on: 5/16/2013 8:01:18 AM | Views : 622

<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 ...