Site Sponsored By: SQLDSC - SQL Server Desired State Configuration
Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
But I have lots of columns returns from sp.. how can I do it above case?Please help..
Sachin.Nand
2937 Posts
Posted - 2011-08-05 : 06:24:50
I dont think it is possible.You will have to create a local linked query and then use OPENQUERY to query the linked server and insert the values in the temp table.
EXEC master.dbo.sp_addlinkedserver @server = N'LOCAL', @srvproduct=N'LINKED', @provider=N'SQLNCLI', @datasrc=N'Your Server Instance'Select * from OpenQuery(Local,'Exec YourSP')