Can I join a table with a stored procedure that gives a table?
Thank you
You need to use INSERT. To store EXEC from SP to data table or table-variable. Then you can join it.
Declare the @temp table (An int, B vertebrae (10), C. Datam); Joined @temp exec myproc 1, 10, 'abcdef'; Please select from @tempt to other theater o ... etc.
Without creating a temporary table, if you skip table-variable, then only the only option is - SP- Take any parameters, use OPENQUERY to run SP to return table. Pseudo:
Select * from (local_services, 'spname_no_params') o on joining T o ... etc
Comments
Post a Comment