【发布时间】:2012-04-26 02:45:35
【问题描述】:
可能重复: How to SELECT * INTO [temp table] FROM [Stored Procedure]
我是T-SQL 的新手。我有一个选择记录的stored procedure。我想查询存储过程返回的记录,所以我试图将记录插入到临时表中。 (堆栈溢出帖子和其他帖子说这是怎么做的。)
但是当我尝试时,我得到了错误:
对象或列名丢失或为空'
当我刚刚运行存储过程时,我得到了一个包含名称列的表。
select * into #temp1
exec alexander.dbo.get_uberrecords '20120101', '20120201', 'labcorp' //throws error saying columns must have names
但是
exec alexander.dbo.get_uberrecords '20120101', '20120201', 'labcorp' // Returns cols with names
我错过了什么?
【问题讨论】:
标签: sql-server tsql