将数据从数据库传输到xml [英] transferring data from a database into xml
本文介绍了将数据从数据库传输到xml的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好,
i我正在尝试将数据从数据库传输到xml文件,,,我已经能够做到这一点但是当我包含where子句时这个小问题在sql语句中,数据显示没有xml标签......任何人都可以帮忙...我想要显示标签。
谢谢
解决方案
它运行的这个语句并为每一行获取标签所以问题是什么
选择 * 来自国家其中 Country_ID> 0 FOR XML AUTO
如果你想为每一列使用标签此声明
选择 * 来自国家/地区其中 Country_ID> 0 FOR XML路径
Hello,
i am trying to transfer a data from a database to an xml file,,,i've been able to do that but the little problem is when i include the "where clause" in the sql statement, the data displays without the xml tags...could anyone help...i want the tags to be displayed.
thanks
解决方案
this statment it is run and get tag for every row so what's the problem
select * from Countrys where Country_ID>0 FOR XML AUTO
If you want tag for every column use this statment
select * from Countrys where Country_ID>0 FOR XML Path
这篇关于将数据从数据库传输到xml的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文