create table #t(
...
)insert #t exec 原来的存储过程select t.*,n.Job,n.Date,n.Quantity
from #t t,[table] n
where ...
...
)insert #t exec 原来的存储过程select t.*,n.Job,n.Date,n.Quantity
from #t t,[table] n
where ...
解决方案 »
- SQL Server 无法启动和查询分析器单步调试问题
- 急求一条update语句
- group by 后面有过两个字段,那么按照那个起作用呢?还是别的?
- 简单问题
- 报表查询出错,求解决
- 急:sql统计语句写法
- 保证表数据不重复
- 存储过程多字段排序分页的问题?
- 如何用C++编写代码将一文本文件(有固定格式)写入SQL SERVER数据库
- 我做批量处理时,join两个表,会出现个别现象,有一个表是空的怎么办?
- 如果用left outer join连接查询以下的两个表?
- http://topic.csdn.net/u/20090413/11/0b9bd505-4d80-4a04-8581-aee964b01abc.html 我上次的帖子还有点问题
create table #Prod(
Job nvarchar(10),
CoNum nvarchar(10),
Item nvarchar(40)
)insert #Prod exec ProdConfListSp ------select t.*,n.Job,n.job_date,n.qty_released
from #Prod t,job n
where t.job=n.job运行后提示错误提示信息:
消息 2714,级别 16,状态 6,第 2 行
There is already an object named '#Prod' in the database.
你才是楼主,要在SQL2005及以上版才能执行insert .. exec.. 的