无法在anotehr存储的过程中使用XML值 [英] cant use XML value in anotehr stored proc
本文介绍了无法在anotehr存储的过程中使用XML值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
请帮帮我..
我有2个SP. P1和P2.
从P1调用P2
P1还将XML变量发送到P2.
但是当我显示XML的值(有5条记录)时,它只是显示最后一条记录..
请告诉为什么. 我要失业了.皱着眉头皱着眉头
这是代码.
Please help me..
I have 2 SP''s. P1 and P2.
P2 is called from P1
P1 also sends an XML variable to P2.
But when I am display the value of XML (which has 5 records), it is just showing the last records..
please tell why. I am gonna loose my job.Frown Frown Frown
here is the code.
alter proc p1
declare @myxml XML
as
begin
select @myxml= firstname from table1
exec p2 @myxml
end
proc 2转到此处:
proc 2 goes here :
alter proc p2(@xx XML)
as
begin
select @xx
end
推荐答案
是的!它只会显示最后的记录.如果查询返回多行,则选择会将最后一条记录分配给变量.
Yes!! It will show only the last records. If the query returns multiple rows then the select will assign the last record into the variable.
这篇关于无法在anotehr存储的过程中使用XML值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文