Posted by jmoore1999@msn.com on 01/18/07 17:15
I need to write a t-sql query that will take the value of the previous
record into consideration before calculating the current row's new
column value...
Here's the situation...
I have a query which return the following table structure...
Full_Name Points
----------------- ------------
Name1 855
Name2 805
Name3 800
Name4 775
Name5 775
Name6 741
etc.... etc...
I need to create a calculated column that tells me where the person
ranks in point position. The problem i run into is that in the
situation where two or more people have the same point value i need the
calculated rank column to display the same rank number (i.e. 4th or
just "4") I'm not sure how to to take into consideration the previous
row's point value to determine if it is the same as the current one
being evaluated. If i new they were the same i could assign the same
rank value (i.e. 4th or just "4").
If any one has any insight that would be great.
Thanks
Jeremy
Navigation:
[Reply to this message]
|