如何将程序返回结果集传递到Temprary表? [英] How to pass procedure return result set into a Temprary Table ?
本文介绍了如何将程序返回结果集传递到Temprary表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨朋友们,
我想将一个程序的结果集传递给临时表
我该怎么做?
谢谢提前
Shreeniwas
解决方案
查看此链接..
http://stackoverflow.com / questions / 653714 / how-to-select-into-temp-table-from-stored-procedure [ ^ ]
hi,
试试这个编码
确保临时表列与程序的返回记录集相同。即字段类型,字段数。 [不是字段名称。]
创建 table #temp(id int )
insert #temp 执行 sp_test
从<选择 * / span> #temp
drop table #temp
Hi Friends,
I want to pass a result set of a procedure into temp table
How can i perform it???
Thanks in Advance
Shreeniwas
解决方案
check this link..
http://stackoverflow.com/questions/653714/how-to-select-into-temp-table-from-stored-procedure[^]
hi,
try this coding
make sure temp table columns should same as return recordset of procedure. i.e., field type, no of fields. [ not the field name.]
create table #temp (id int) insert #temp execute sp_test Select * from #temp drop table #temp
这篇关于如何将程序返回结果集传递到Temprary表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文