I have one Stored procedure that looks like this
Now I want to execute this sp whithin another sp.
To store the result in a variable when selecting from a table is easy (select @myVar=a FROM my_table)
but how does it works when the result is retrived from a stored procedure insteed of a table?
If the sp returns a parameter I know how to do it, but this sp dosn't return a parameter.
Is this possible or do I have to make a view or rewrite the sp.
Code:
CREATE PROCEDURE sp_test
@c
AS
SELECT a, b, c FROM my_table WHERE c=@c
Now I want to execute this sp whithin another sp.
To store the result in a variable when selecting from a table is easy (select @myVar=a FROM my_table)
but how does it works when the result is retrived from a stored procedure insteed of a table?
If the sp returns a parameter I know how to do it, but this sp dosn't return a parameter.
Is this possible or do I have to make a view or rewrite the sp.