Sqlserver
 sql >> Base de Dados >  >> RDS >> Sqlserver

Execute o procedimento armazenado na tabela temporária dinâmica

SELECT * INTO #TempTable 
FROM OPENROWSET
('SQLNCLI','Server=(local)\SQL2008R2;Trusted_Connection=yes;',
     'EXEC OtherDb.DataProd.abc')

SELECT * FROM #TempTable