I received a ticket today concerning a broken application that was caused by a broken stored procedure.
The stored procedure had been working for a few months now, but today when I examined it I found a few bugs.
first there was a query like this.
SELECT a.a , b.b , a.b FROM table1 a JOIN table2 b ON. a.a = b.a
the period after the "ON" obviously caused the error. Fixing it was easy, but as far as I know, you can't save a stored procedure that is broken. In fact, when I opened the stored procedure, (without modifying it) and tried to run the alter with the code from there, it failed with the error messages.
There were other errors like this through the stored procedure that I fixed to finally run the alter.
I don't understand how this is possible, and would like to know what could change and save a stored procedure that is broken. From what I've been told there have been no changes to the server at all, and like I mentioned before this stored procedure had been working for the past few months
It feels like i'm hunting a ghost, and any information will be greatly appreciated.