Soha Nasr
Soha Nasr

Reputation: 1

SQL join table with the output of a stored procedure

I want to join the output of a stored procedure with a table. I know and i am sure that it is possible because i did it before but, i can't remember how. Could anyone help me with that, please?

Upvotes: 0

Views: 9439

Answers (1)

Duncan Howe
Duncan Howe

Reputation: 3025

You would have to insert the results of your stored procedure into a temporary table and then join to that.

e.g. insert into #temp_table exec sp_mySP

You would have to define the temporary table structure to match the output of your stored procedure though.

Upvotes: 5

Related Questions