Search code examples
sqlsql-servert-sqlsql-server-2000dense-rank

Dense_Rank() alternative in sql server 2000?(Set based)


Actually, I have the task of finding the employees based on the salary rank.

So I used Dense_Rank() and got the answer.

Initially I was told to solve in SQL SERVER 2005.

Later on they changed the requirement and is saying that the query should run in SQL SERVER 2000 also.

I solved that using a while loop.

But they are saying that they will accept the solution using SET BASED approach.

How to do that?

Thanks in advance


Solution

  • Refer to this article, Ranking In SQL Server 2000

    The author talks about how to implement Dense_Rank()