To use a temporary table this way in INSERT INTO , you must first define this table.
CREATE TABLE
In T-SQL, a temporary table can be created automatically using the following command:
select * into #tblTemp from table
You can use this syntax for your stored procedure results using OPENROWSET .
Here is an answer to SO that might help
valex source share