How do you create a rank field in an sql query? To be used in a DataReport.

measu
measu used Ask the Experts™
on
This seems like it should be the easiest thing in the world... but I'm seriously struggling!  I have a recordset, which I have ordered on a numeric field.  I would like a separate field which contains the rank for each record.  i.e.

Before:

Player          Goals Scored
Bob          6
Bill          5
Andrew          5
Matt          2

After:

Rank     Player          Goals Scored
1     Bob          6
2     Bill          5
2     Andrew          5
4     Matt          2

If it can be done so that the OrderBy can be by any field then so much the better, i.e. sort by Alphabet:

Rank     Player          Goals Scored
2     Andrew          5
2     Bill          5
1     Bob          6
4     Matt          2


Please help, I'm loosing my mind!
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Author

Commented:
I've found it!  The answer is at:

http://support.microsoft.com/default.aspx?scid=kb;en-us;186133

In case you are interested.
Ryan ChongSoftware Team Lead

Commented:
A good link indeed, here is a suggestion:

PAQ this question with 0 pts. You can do that by post a request at Community Support.

http://www.experts-exchange.com/Community_Support/

Cheers
Commented:
PAQ'd and points refunded as proposed

modulo

Community Support Moderator
Experts Exchange

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial