Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Ranking Query and Cursors

Author  Topic 

Boucaner
Starting Member

2 Posts

Posted - 2004-06-09 : 06:54:06
Greetings all,

I have a table with three fields; Rank, Name, Amount. I want to update the Rank field by putting a 1 in the row with the highest amount, 2 with the second highest, 3 in the third, etc. I have been playing around with subqueries and such, with no luck. Is there some simple way to do this that i am not aware of?

Also, I tried using a cursor (via query analyzer), but it will only open as read-only. Checking the setting of the server revealed nothing.

Thanks in advance for any help on this.

Boucaner
Starting Member

2 Posts

Posted - 2004-06-09 : 07:14:59
Thanks to our friendly neighbors here at SQLTeam, the answer has been found. Their article

http://www.sqlteam.com/item.asp?ItemID=1491

was perfect.
Go to Top of Page
   

- Advertisement -