Tuesday, February 16, 2010

CATCH block not executing after an error in the TRY block

Today we had trouble with the CATCH block in a T-SQL script which did not execute after an error in the TRY block. It turned out that there are times when your TRY block can fail and the CATCH block will get bypassed altogher.

Click here or on the title of this article to see the article by Alexander Kuznetsov about exactly this problem.

Our problem was a compile error: a column name we referenced in a join statement no longer existed.

No comments: