|
We have supervisors in our database who have multiple employees assigned
to them. We need to generate a list of 5 cases per supervisor. A
supervisor could have as many as 1000 and as few as one case.
There are some conditions that I would like to implement when choosing
the cases within each supervisor
If the person has been hired (a binary field) I want those cases to be
entered in as a portion of the 5 per supervisor (these are the best
cases and I want them to stay).
That could for example pull in 2 cases for a certain supervisor. The
supervisor will then have 3 spaces that I need to fill to get to my 5.
So basically if the person does not have a 1 in the hired field, then we
should bring in cases with another binary condition (gender for example)
to fill out the 5 for that person. Then pull in cases where which have
information on race.
Then randomly select from remaining cases until the 5 (or fewer) exist
for every contact
John V. Harnisher
|