select top 0 * INTO #temp from stored procedure
Need to create temp table based on the structure of data type returned from stored procedure. Using sql server 2000,2005, 0r 2008
select top 0 * INTO #temp from stored procedure
Need to create temp table based on the structure of data type returned from stored procedure. Using sql server 2000,2005, 0r 2008
You can't do this. To get the results from a stored procedure, you have to first define the structure of the results:
create table #temp ( . . . );
insert into #temp
exec(stored procedure)
If you examine the syntax for the SELECT
statement (here), you'll see no reference to running a stored procedure.
Perhaps you should post another question describing what you are trying to do. Why would a stored procedure be returning different result formats?