Hi,
I would need a suggestion or even a solution, how to get only the second,third... row of a query result with high performance. I know there is the possibility of row_number(SQL Server 2005 or higher) but not for SQL Server 2000 :-(
My first try to get the fifth row was:
SELECT TOP 1 col
FROM (SELECT TOP 5 col
FROM table
ORDER BY col) q
ORDER BY col DESC
I try to explain my requirements: In my table there can be max. 5 rows for one person. But if only 4 rows for this person exists I would get a wrong result with my above query.
Any suggestions?
Any help will be appreciated!
Thx forward, Best Regards Andreas