Create XML file from SQL Data

November 14th, 2010 by Kristy Leave a reply »

Thanks to an article on SQLAuthority.com I found a quick and easy way to create an XML file from data in a sql database.  I adapted his article and came up with this example.

select ( Select * from table for XML PATH(‘SAMPLEXML’),
TYPE
)
Form XML Path(”),
Root(‘XMLNODENAME’)
Go

signature
Advertisement

Leave a Reply