在sql2005中迭代xml [英] iteration of xml in sql2005

查看:68
本文介绍了在sql2005中迭代xml的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在xml中循环每个项目。

在我的方案中我的xml包含

10个帐号。

在我的存储过程中我一次需要每个帐号,并且必须进行其他操作并插入另一个表。这意味着它将循环10次。



如果有人知道请让我知道。

i want to loop each item in xml .
in my scenario my xml containing
10 account numbers.
in my stored procedure i need each account number at a time and have to do other operation and inserting into another table.that means 10 times it will loop.

if anyone know please let me know.

推荐答案





您需要将xml数据插入表中然后在这张新桌子上执行你的操作。



根据你的过程,你可能需要临时表或永久表。如果它是永久性的,你可以在你的过程最终确定时截断表,而不是有不必要的数据。



希望这有帮助。
Hi,

You will need to insert your xml data into a table and then perform your operation on this new table.

Depending on your process you may need a temp table or permanent table. If it is permanent you can truncate table when your process is finalised not to have unnecessary data.

Hope this helps.


这篇关于在sql2005中迭代xml的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆