Output SQL Server table to XML in a directory on the server



I'm trying to export my



select column1, column2
from table1


into a XML file and save it into a directory of c:\Test\ on the server.


I would also like the file to be overwritten when the i run the query again with same output xml name.


Is there away of doing this without going through creating a how SSIS Job. I have used the feature FOR XML AUTO and FOR XML PATH but these do not give you a formed XML that will open as well as the option to save into a location.


Any ideas on how to do this would be good!


No comments:

Post a Comment