rank

C

Craig

Is there a function in Access '97 that does the same thing
as the Rank() function in MS Excel? I want to take a list
of numbers and rank them relative to each other. I
figured if you could do this in Excel, you could do it in
Access. If anyone can help, it would be appreciated.
Thanks...

Craig
 
M

Marshall Barton

Craig said:
Is there a function in Access '97 that does the same thing
as the Rank() function in MS Excel? I want to take a list
of numbers and rank them relative to each other. I
figured if you could do this in Excel, you could do it in
Access.


In a database system, queries are the normal way of dealing
with data. A spreadsheet function doesn't really apply
since there's no range of cells to operate on.

Here's a simple query that includes a ranking subquery:

SELECT table.person, table.score, . . .
(SELECT Count(*)
FROM table As X
WHERE X.score <= table.score
) As Rank
FROM table
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top