What is the easiest way to export to XML from SQL Server [Table or view] to XML?
This is what I have done till now
Execute Sql Task
SELECT * FROM Production.Product
FOR XML AUTO, TYPE, ROOT('Data')
ResultSet XML
in left result set section I have created new variable 0 User::XMLVal
Script Task
Dim sw As New IO.StreamWriter("D:\Apps\SSIS\test.xml")
sw.Write(Dts.Variables("User::XMLVal").Value.ToString())
sw.Dispose()