Forgot to mention,

you can make a function using my previous post.

You can use the function in the update statement.

Regards
Gert