>Michel, Sorry I am not providing any help with your question, but I would change the whole approach, after all why do you update fields that can be calculated when required? You can easily create a view with this information without the massive updates with values that are derived from other tables/fields.
That sounds like a good idea. Although if calculation takes long time, may be not too good.
If it's not broken, fix it until it is.
My Blog