How do I do a SELECT * INTO [temp table] FROM [stored procedure]
? 如何SELECT * INTO [temp table] FROM [stored procedure]
進行SELECT * INTO [temp table] FROM [stored procedure]
? Not FROM [Table]
and without defining [temp table]
? 不是FROM [Table]
,也沒有定義[temp table]
? ui
Select
all data from BusinessLine
into tmpBusLine
works fine. 從BusinessLine
Select
全部數據到tmpBusLine
能夠正常工做。 spa
select * into tmpBusLine from BusinessLine
I am trying the same, but using a stored procedure
that returns data, is not quite the same. 我正在嘗試相同的方法,可是使用返回數據的stored procedure
並不徹底相同。 .net
select * into tmpBusLine from exec getBusinessLineHistory '16 Mar 2009'
Output message: 輸出信息: code
Msg 156, Level 15, State 1, Line 2 Incorrect syntax near the keyword 'exec'. 消息156,級別15,狀態1,第2行關鍵字「 exec」附近的語法錯誤。 get
I have read several examples of creating a temporary table with the same structure as the output stored procedure, which works fine, but it would be nice to not supply any columns. 我已經閱讀了幾個建立與輸出存儲過程具備相同結構的臨時表的示例,該示例工做正常,可是最好不要提供任何列。 it