如何将一个查询结果保存在特定的XML文件中 [英] How can I save one Query Result in a specific XML File
本文介绍了如何将一个查询结果保存在特定的XML文件中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个非常严重的问题,我有一个类似这样的查询:
Hi , I Have A really serious Problem , I have A Query Like This :
select
(
Select (
Select TColum From Table For XML Path(''), type
)
FOR XML PATH(''),
ROOT('categories')
,Type
)
,
(
Select (
Select
(
Select @S1 for xml path(''),type
)
For xml path (''),
ROOT('Name')
,type
)
,
(
Select
(
SELECT TColum2 as point FROM Table2 FOR XML PATH('') ,type
) FOR xml path ('') ,ROOT('data'),type
)
For xml path (''),
ROOT('Series')
,type
)
,
(
Select (
Select
(
Select @S2 for xml path(''),type
)
For xml path (''),
ROOT('Name')
,type
)
,
(
Select
(
SELECT Colum3 as point FROM Table2 FOR XML PATH('') ,type
) FOR xml path ('') ,ROOT('data'),type
)
For xml path (''),
ROOT('Series')
,type
)
此查询,使XML格式成为我需要的,但是我想将此结果保存到文件中,在我的ASP项目中,
谢谢Bros ...
This Query , Make The XML format I Need, But I want To Save This Result in A File , In my ASP Project ,
Thanks Bros...
推荐答案
希望此链接对您有帮助:
http://blog .sqlauthority.com/2009/02/12/sql-server-simple-example-of-creating-xml-file-using-t-sql/ [
Hope this link will help you:
http://blog.sqlauthority.com/2009/02/12/sql-server-simple-example-of-creating-xml-file-using-t-sql/[^]
我检查了The Link Before,
在SQL中创建XML结构没有问题,
我想保存用查询创建的XML并使用它,
我在等你的帮助... Thx
I checked The Link Before ,
I don''t have Problem with Creating the XML Structure in SQL,
I wanna Save The XML I Created with Query and Use it ,
I wait for your Helps ... Thx
这篇关于如何将一个查询结果保存在特定的XML文件中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文