Krasavita (10/26/2009)
Thank you, but this code I run takes to long and Begin Tran takes much faster,do you know why?
I suppose it's possible that the optimizer is locking the whole table (probably a good thing in this case) when you use Begin Tran. It that works for you, go ahead an use it. It shouldn't have been needed, though.