Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Renumbering rows -- need idea
Message
De
29/02/2008 08:48:09
 
 
À
29/02/2008 08:00:55
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
01297681
Message ID:
01297684
Vues:
16
Hi Tony. I ran a football pool last season where I needed to show a number representing the "Position" based on total score for each user.
i.e.
Pos. Team Name
1 team 1
2 team 2
.
.
.

I created a view using sqlexpress of the fields I needed, but needed to use the server explorer in VS 2005 to get this to work in a stored procedure because sqlexpress doesn't supprot transaction sql. I don't have the exact code I used here at work, but here's the sample code I used:

SELECT ROW_NUMBER() OVER(ORDER BY score DESC) AS rownum, speaker, track, score
FROM SpeakerStats ORDER BY score DESC

I found it at:

http://msdn2.microsoft.com/en-us/library/ms345144.aspx

I hope this is useful for you.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform