• Peter Schulz-485500 (11/17/2013)


    Well, I guess you're right, and I agree. I inherited the code and yes, it won't stay this way.

    But my question is rather why does something like this occur - it did work for 2 years and it's perfectly valid T-SQL, so why does SQL Server suddenly decide it has to go into a spin turn-around?

    It was consistent and reproducable, I tried it with various cursor filters, about 20 times.

    Based on just the code for the cursor, I have no idea as it looks correct. Since we don't have access to your system and the data there really isn't much we can tell you. A guess would be something changed recently. Could be the structure of the data, could be something in the data.