I am having trouble finding where did the error occured in the prodecure. I modifying a previously written procedure which inserts and updates. But if there is error at insert block it make @@error=1 and if there is no error then @@error=0. Now in the next block of the code, if there is error then @error=1 but this doesnt tell me that if there was errors in the previous blocks of code. I am trying to find a solution that would let me know of the all the errors in the stored procedure and which block of the procedure. I would appreciate you help. If you have any suggestion please let me know. Thank you.