Ranking

G

Guest

How do you write an expression or SQL statement that will rank data. I have
employees that make calls that I log in your database. I have a rank number
that will show who has the most calls, this way when I pull a report it will
show the ranking number.
 
T

Tom Ellison

Dear DDR:

You can create this rank by COUNTing all the employees that have a larger
number of calls. This give a rank of 0 for first place. Add 1 to this
value for a more "normal" appearance.

To give you details on how to do this, I would need the details of your
design. Post a query showing everything except this ranking and I'll add
the code to that. This query must show the employee and the number of
calls.

Tom Ellison
 
D

Duane Hookom

If the report is sorted by the value used to rank then just add a text box
to the detail section of the report:

Control Source:=1
Running Sum: Over All
 
G

Guest

Here is what my query looks like

AgentID Manager EmployeeStatus Outbounds
tblEmployees tblEmployees tblEmployees tblDailyStats

Xfers
tblDailyStats

I am trying to rank by outbounds

I hope this is what you are asking for. Xfers and Outbounds are Numbers,
everything elese is text

Thanks Tom!!!
 
T

Tom Ellison

Dear DDR:

I'm sorry if you didn't understand what I asked for. Open your query in SQL
View and copy the text of the query. Paste it into your message. I'll
attempt to modify that. The query I produce will hopefully work when pasted
back in reverse, pasting the text into the SQL View.

Tom Ellison
 

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