How to perform msSQL save xml file?

Asked By 10 points N/A Posted on -

Hello experts,

How to perform mssql save xml file? I am just a newbie in the world of mssql database server but willing to learn and explore more in the world of technology. Can you give me some steps to be followed on how to save xml file? Thank you experts.

Answered By 10 points N/A #179727

How to perform msSQL save xml file?



Don’t worry, it’s very easy. In Microsoft 2005, there are many XML extensions that make it easy to play with XML and database. There are many keywords like auto, raw, elements, Root and data. You can use these are save your XML by setting the output to the XML file and running a query. For example check this query.
  • Select First Name, Last Name, Phone, Email, Address
  • From Employees
  • For XML AUTO, elements
This query will return all the rows as parent row and columns as a child node for each row and row node will be of Employee type.
I hope this will helps you.
Thank you.

Login/Register to Answer

Related Questions