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 2005 Forums
 Transact-SQL (2005)
 Newbie: Find and return a specific row value

Author  Topic 

Puzzled
Starting Member

2 Posts

Posted - 2008-04-17 : 07:33:05

Hi Newbie here,

i am trying to make a highscore table and i would like when the user enters a score for them to be able to see what position they are in the database without having to take out all the data. i have looked at a few methods and was wondering which one is the best solution and how i would go about implementing it

count()
rank()
Indexes

Any response would be greatly appreciated


Puzzled

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-04-17 : 07:34:50
RANK() or DENSE_RANK() would be your option due to ties.



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

Puzzled
Starting Member

2 Posts

Posted - 2008-04-17 : 07:47:59
Cheers Peso!

Ill give that a bash, i dont suppose you know or could link me to the correct syntax for it?

Thanks again

Puzzled
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-04-17 : 07:52:03
Other than the excellent Books Online?



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page
   

- Advertisement -