I'm looking at an error from one of our web applications, and it was calling a stored procedure that was responsible for updating a record in the database.
This stored procedure has worked for weeks with no issues. Then one day it started throwing errors, while debugging we found the cause to be inside the stored procedure.
It basically had a statement like this
Begin
// Do Stuff
Set
End
So the SET
never actually set anything. For some reason this runs in perfectly fine on our server, and was running fine on a client server until earlier today when it decided to start complaining. (Incorrect Syntax error)
Is there any type of SQL Server setting that would cause this sudden change in behaviour?
Clarification - The SET
has always been in the procedures. And running a SET
by itself, or as a sole statement in a stored procedure does in fact work for me. This is the problem, it shouldn't work. So is there anything that would cause it to work when it should be failing?