Trigger insert sequence from defined set of values
I am not quite sure how to describe it but I have an application where end users submit accounts to be worked and they all go in a table. I am in need of assigning these accounts to a group of ten other users for example. These ten users have their own personal user id's.
Thus when the account is inserted into the table a trigger needs to insert a specific user id in the "Assigned" column and do so in a sequence to ensure an equal number of accounts per person. Just not sure how to design this.
Thanks in advance.
Oracle Database
Last Comment
mjfigur
8/22/2022 - Mon
slightwv (䄆 Netminder)
Round robin? So every 10th record is assigned to the same person?
Try the MOD operator against the sequence.
Not 100% accurate since sequences are not gapless but something like setting assigned to: Mod(sequence.nextval,10)
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
Thank you that is such a great idea. Will have it pull dynamically assigning them when they are requested will allow for my fluidity especially when one of the users may be out of the office on a given day or week.
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
Try the MOD operator against the sequence.
Not 100% accurate since sequences are not gapless but something like setting assigned to: Mod(sequence.nextval,10)