I want to raise an error in my stored procedure and then have the code go to a specific part of the sproc to deal with errors before exiting. Is this the right way to go about doing this?
e.g.
if (condition)
begin
rollback tran
raiserror
goto on_error
end
--other stuff
on_error:
set @result = 0
return @result
Cheers,
Mike
e.g.
if (condition)
begin
rollback tran
raiserror
goto on_error
end
--other stuff
on_error:
set @result = 0
return @result
Cheers,
Mike