I have a stored procedure that calls another stored procedure 3 times. Each time is with a different parameter value. This produces 3 separate datasets that are returned form the shell procedure. How can I union these into 1?
Basically what I have now just looks like
EXEC sp @test = x
EXEC sp @test = y
EXEC sp @test = z
I've tried inserting into a temp table and then selecting form that but I get an error that says "An INSERT EXEC statement cannot be nested."
Start Free Trial