Thursday, June 27, 2013

Skipping procedure


Hi,


I've got one long Procedure that contains many procedures.


I have a job that run this long procedure every night.


Sometimes one of the procedures in the long procedure fails (it can be any procedure) and it's failing the whole long procedure and I still want the long procedure to keep on running


My question is: how do I skip procedures that fails in order to keep the long procedure running?



You can try and catch the error of sub-sp and let the SP continue to do the next statements. Read:


TRY...CATCH (Transact-SQL)




Many Thanks & Best Regards, Hua Min


No comments:

Post a Comment