Hi there.
I'm using a PL/SQL back end (and VB.Net front end) to develop an application that will take accounts from one employee (the Source) and reassign them to one or more than one other employees (the Destination).
It's when the accounts are reassigned to more than one employee that I'm having issues with.
For example, if one employee leaves the company and her accounts are being reassigned to four other employees, I want to have the accounts distributed by account balance, so they will be distributed somewhat equally.
For instance, if the Source account balances are: $1000, $850, $700, $600, $500, $300, $250 they would be distributed between the four employees as follows:
Employee 1st Assigned Acct 2nd Assigned Acct
Joe $1000 -
Samantha $850 $250
Erin $700 $300
Kate $600 $500
The user selects the Destination employees from a drop down list on the VB form (and adds them to a list box), so I need a way to count the employess in the list box and distribute the accounts in a descending, and then ascending way, once at the bottom of the list of destination employees.
Any ideas of where to start?
Hope this makes sense.
Thanks a bunch for any help.
I'm using a PL/SQL back end (and VB.Net front end) to develop an application that will take accounts from one employee (the Source) and reassign them to one or more than one other employees (the Destination).
It's when the accounts are reassigned to more than one employee that I'm having issues with.
For example, if one employee leaves the company and her accounts are being reassigned to four other employees, I want to have the accounts distributed by account balance, so they will be distributed somewhat equally.
For instance, if the Source account balances are: $1000, $850, $700, $600, $500, $300, $250 they would be distributed between the four employees as follows:
Employee 1st Assigned Acct 2nd Assigned Acct
Joe $1000 -
Samantha $850 $250
Erin $700 $300
Kate $600 $500
The user selects the Destination employees from a drop down list on the VB form (and adds them to a list box), so I need a way to count the employess in the list box and distribute the accounts in a descending, and then ascending way, once at the bottom of the list of destination employees.
Any ideas of where to start?
Hope this makes sense.
Thanks a bunch for any help.