Possible duplicate: How to select * INTO [temp table] FROM [Stored procedure]
I am new to T-SQL . I have a stored procedure that selects records. I want to query the records returned by the stored procedure, so I'm trying to insert records into a temporary table. (Stack Overflow Messages and other messages say this is how to do it.)
But when I try, I get an error:
Missing or empty object or column name '
When I just start the stored procedure, I get a table with columns with names.
select * into #temp1 exec alexander.dbo.get_uberrecords '20120101', '20120201', 'labcorp' //throws error saying columns must have names
but
exec alexander.dbo.get_uberrecords '20120101', '20120201', 'labcorp' // Returns cols with names
What am I missing?
bernie2436
source share