Tuesday, March 20, 2012

save to xml

Hi,
is it possible to save the results from a query to an xml file directly from sql server (so without the use of any visual studio languages). What I would like to do is that when a user on our site completes an order, this order is saved as an xml file.
ThanksLook in BOL for the syntax in a SELECT

FOR XML AUTO

there are lots of options...

Never used it myself though|||yes, I know about the xml options. But those options format your query results. What I want to do is save these results to a physical xml file. The name of this file should be dynamically assigned. Do I use some kind of dts package or are there functionalities in for example SQLXM?|||bcp out a query or view from a stored procedure?|||Thanks Brett, thats what I thought. But perhaps I need to rephrase my question a bit: does anyone have some experience in using xml with SQL Server. What are the pros and cons? Did you use it directly or through an application?

No comments:

Post a Comment