>>You're welcome. Are you sure you need to loop and can not do this in one shot as Sergey showed? Using cursors in SQL Server is slow. Of course, if this is one time deal or small set of records, it doesn't matter.
>
>I need to have it in a loop as I will add more processes soon.
Ok. Because the current code as is seems to duplicate two update commands Sergey showed and don't have to be in the loop.
If it's not broken, fix it until it is.
My Blog