TheresAlwaysAWay
Programmer
I have been asked to create a routine to divide a list of customers among several employees for them to be followed up. For simplicity, imagine a list of 100 records to be split among 10 people.
My thought was that if I could run a query that would assign the numbers 1-10 to each record in the set in sequence and repeat that sequence until the end, then of course it's easy to sort all the 1's and send them to Joe and all the 2's go to Sally and the records would be evenly divided. I'm imagining this as some sort of counter within the query. There is no specific ordering involved. All records and employees are considered to be equal in this case, and we just want to randomly divide them up.
This concept is just a suggestion, but it may not be the ideal way to accomplish my goal. I'm not trying to limit the solution to one possible framework.
Can anyone suggest a way that will provide the distribution that is required?
Thanks in advance for any assistance you might offer.
After posting I realized that my simplification might get in the way. There could be 4 or 7 or any number of employees, so it couldn't be as simple as numbering all the records and only looking at the last character of the count.
My thought was that if I could run a query that would assign the numbers 1-10 to each record in the set in sequence and repeat that sequence until the end, then of course it's easy to sort all the 1's and send them to Joe and all the 2's go to Sally and the records would be evenly divided. I'm imagining this as some sort of counter within the query. There is no specific ordering involved. All records and employees are considered to be equal in this case, and we just want to randomly divide them up.
This concept is just a suggestion, but it may not be the ideal way to accomplish my goal. I'm not trying to limit the solution to one possible framework.
Can anyone suggest a way that will provide the distribution that is required?
Thanks in advance for any assistance you might offer.
After posting I realized that my simplification might get in the way. There could be 4 or 7 or any number of employees, so it couldn't be as simple as numbering all the records and only looking at the last character of the count.