Hi @Lylyy
You could insert the output into a new table.
If you are able to modify the SP, then you could add a SELECT column-list INTO NewTable
, after the new table created you might remove the statement.
If not, you could use OPENROWSET which exists several security risks:
SELECT *
INTO New_Table
FROM OPENROWSET('SQLNCLI',
'Server=localhost;Trusted_Connection=yes;',
'EXEC YourSP')
You might also see this similar thread for more workarounds: Insert results of a stored procedure into a temporary table.
Best regards,
Cosmog Hong