Hi!
Since we have not actually seen the entire script nor have any idea what the other process is, there is no way to answer this.
This is the same whole script. It will ran by multiple scheduled tasks, maybe at same time.
It registers logged in user. Different processes may have same user name. In this case one row should remain.
I can just ignore duplicate key error on commit but maybe there
is some better way not to cause error.
Andrus.