I have two sp - sp1 and sp2
Sp1 is called from the client program
if @TotAmtRefund_Receipt <> @TotAmtRefund_BillDet
Select 'Mismatch in AmtRefund_Receipt and
AmtRefund_BillDetail Cannot Refund Bill... Contact Admin'
IF XACT_STATE() <> 0
Select Error_message() ErrorCondition
sp2 code ( not enclosed within begin and commit transaction and try catch block)
my problem is that if the condition is not met only sp1 is getting rolled back and sp2 is getting executed.
In one of previous post i was told that once the sp2 is executed with in the Begin transaction of the sp1 , sp2 is implicitely part of sp1 transaction.
can some expert help me to resolve the issue