SQL Sored Procedure
Budget: $10 – $30 USD
We need to create a SQL stored procedure to divide the calls to the user automatically based on the user count and the total calls count.
Example:
If we have 4 users on the table (USERS) and we have 15 calls on the table (calls)
the system will distribute 4 calls for each user.
Total =15 calls/4 users = 4 calls for each user.
⦁ The system will take the first 4 rows from the (calls) table and the first user from the (users) table,
and will assign the calls to this user on the "user worklist" table and will repeat the task till the records end on table “calls”
Example:
If we have 4 users on the table (USERS) and we have 15 calls on the table (calls)
the system will distribute 4 calls for each user.
Total =15 calls/4 users = 4 calls for each user.
⦁ The system will take the first 4 rows from the (calls) table and the first user from the (users) table,
and will assign the calls to this user on the "user worklist" table and will repeat the task till the records end on table “calls”