begin try begin tran do cursor processing commit tran end try begin tran begin catch rollback tran raiserror ('failed',16,-1) end catch
========================================== Cursors are useful if you don't know sql. SSIS can be used in a similar way. Beer is not cold and it isn't fizzy.
I have one doubt about using begin try end try here.
If there is error in any record say 8th row in cursor so as BEGIN TRY and BEGIN CATCH is used , it will go to catch block and the CLOSE Cursor and dealloacte cursor in BEGIN TRY doesnt gets executed ?
so if next time the procedure is executed will it give the cursor already exists?