If I get you correctly, you have a stored procedure being called by another stored procedure and you want ...
stackoverflow.com