I want to call a SP from another SP. I know I can easily call it. But Problem is, if an error occurs in SP2 then I want to ROLLBACK SP1.
SP1
BEGIN Tran
[Some Code]
Call to SP2
[Some Code]SP2
BEGIN TRAN
[Some Code]
[Error Comes]
ROLLBACK TRAN
This would rollback Tran in sp2 only. I want to RollBack SP1 as well, if an error occurs in sp2.
Any help would be appreciated.