yes.use northwindgocreate proc sub1asinsert into orders (customerid, employeeid, shipvia)select 'vinet', 5, 1 -- this is okgocreate proc sub2asinsert into orders (customerid, employeeid, shipvia)select 'vinet', 5, 22 -- this isn'tgocreate proc mainasset xact_abort onbegin tranexec sub1exec sub2commitset xact_abort offgoexec maingoselect * from ordersorder by orderid desc--delete from orders where orderid >= 11082go drop proc sub1drop proc sub2drop proc main
Go with the flow & have fun! Else fight the flow