SP returning a table -- ? There's an SP that in effect returns a table -- it loops and executes
statements like SELECT @field1, @Field2, @Field2
Can I capture its results in a table? I know that if it were a FUNCTION
that returned a table, that would be simple:
INSERT ResultsTable SELECT * FROM dbo.Function (@Param1, @Param2)
But how to do that if the code is a procedure rather than a function? |