Sort User Worklist

R

Random1

I have four end users. I need to sort each worklist by alpha then divide the
count by four. This will allow each user to have equal number of accounts by
alpha based on number of active accounts for that day.

The main file which the query's are built from have a specific date of
service, and each record has a unique account number (unique identifier - no
duplicates). Ideally when they log into the database the rolling accumilitive
total for all service dates are equally split by alpha by service date. Not
sure if this is possible.... Thanks
 
J

John W. Vinson

I have four end users. I need to sort each worklist by alpha then divide the
count by four. This will allow each user to have equal number of accounts by
alpha based on number of active accounts for that day.

The main file which the query's are built from have a specific date of
service, and each record has a unique account number (unique identifier - no
duplicates). Ideally when they log into the database the rolling accumilitive
total for all service dates are equally split by alpha by service date. Not
sure if this is possible.... Thanks

Try four queries like:

SELECT TOP 25 PERCENT <field, field, field>
FROM Worklist
WHERE <criteria>
ORDER BY <alpha>;

SELECT TOP 33 PERCENT <field, field, field>
FROM (SELECT TOP 75 PERCENT <field, field, field>
FROM WORKLIST
ORDER BY <alpha> DESC)
ORDER BY <alpha>

etc.
 

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