sommarskog.se
How to share data between stored procedures
This article tackles two related questions: How can I use the result set from one stored procedure in another, also expressed as How can I use the result set from a stored procedure in a SELECT statement? How can I pass a table as a parameter from one stored procedure to another?