Yup. It will event ually timeout with a deadlock error.
You are reading from the variable while trying to write to it.
Do it in two steps.
Cheers,CrispinI can't die, there are too many people who still have to meet me!It's not a bug, SQL just misunderstood me!