Click here to Skip to main content
15,887,343 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Dear Expert,

1. Need to assign issues to personnel to handle on regional basis.

2. Need to map the issues evenly and equally amongst personnel as folows.

Personnel
idno name region
-------------------------
001 ike central
002 pet central
003 don central

0011 jan north
0012 ivy north
0013 alf north

0015 ama east
0016 ema east
0017 pal east


Issues
ticket_no date region issue name-of-officer-to-be-assigned
--------------------------------------------------------------------------
00000001 14/09/2016 central ------
00000002 14/09/2016 central ------
00000003 14/09/2016 central ------
00000004 14/09/2016 central ------
00000005 14/09/2016 central ------
00000006 14/09/2016 central ------
00000007 14/09/2016 central ------
00000008 14/09/2016 central ------
00000009 14/09/2016 central ------

00000011 14/09/2016 north ------
00000012 14/09/2016 north ------
00000013 14/09/2016 north ------
00000014 14/09/2016 north ------
00000015 14/09/2016 north ------
00000016 14/09/2016 north ------
00000017 14/09/2016 north ------
00000018 14/09/2016 north ------
00000019 14/09/2016 north ------


00000111 14/09/2016 east ------
00000112 14/09/2016 east ------
00000113 14/09/2016 east ------
00000114 14/09/2016 east ------
00000115 14/09/2016 east ------
00000116 14/09/2016 east ------
00000117 14/09/2016 east ------
00000118 14/09/2016 east ------
00000119 14/09/2016 east ------



How do you assign the personnel to the issues programmatically so that the issues
are evenly distributed as and when they occur.

stored procedure in ms sql server

Thanks

What I have tried:

tried it on my own, i have checked the internet for silimar cases
Posted
Updated 22-Sep-16 10:24am
v5
Comments
[no name] 22-Sep-16 11:58am    
Find the one that has the least number of issues assigned to them and assign them the new issue.

1 solution

Well... I'd suggest to read similar threads:
Algorithm for fairly assigning tasks to workers based on skills - Stack Overflow[^]
Algorithm to assign task to resources - Stack Overflow[^] - perfect in your case!
Work Assignment Algorithm - Stack Overflow[^]

I've never seen SQL based solution, but this: Graphs and Graph Algorithms in T-SQL[^] may help you in implementation of your own.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900