Is it possible to store the results of a call to exec sp_executesql in a 'table parameter'. The parameter value is used in another SQL Stored procedure (SQL 2000/2005)
+2
A:
Best you can do is insert the values into a temp table (using an INSERT EXEC pattern) and then use that temp table in the second proc down the chain ...
Sam Saffron
2009-01-20 11:46:30
A:
If you are wanting to store the results of some process in a table variable, I would suggest making it a table-value function instead of a sproc. That way you can then use the end-result of the first function in whatever other processing you are doing
Select * from MyTableValueFunction()
TheTXI
2009-01-20 11:52:52