SELECT *
INTO #temp --(or @tempTable)
FROM OPENQUERY(, 'EXEC Procedure')
then apply search criteria on it.
SELECT * From #temp -- (or @tempTable)
WHERE
But the concern is the performance while dealing with huge data. Imagine your SP is returning 5 million records and your search criteria limits it to thousands records, then its really a waste time and resources. So you may need to work out different plan, something like preferring a Table-valued function over the existing Procedure.
SELECT *
INTO #temp
FROM OPENROWSET('SQLNCLI', 'Server=
;Trusted_Connection=yes;',
'EXEC
.
.
)') AS a;
for more details regarding OPERNROWSET refer [here][1] [1]:
http://msdn.microsoft.com/en-us/library/ms190312.aspx
No one has followed this question yet.
show output in group wise in sql server
Two temp tables joined by inner join, how to compare the two dataset without getting duplicates
sql server 2008 is backward compatible with sql server 2000 or not
please help this is very urjent requirment
Create a stored procedure to upload data from 3 csv files one after other.