x

Export SQL XML data to file with format

I use T-sql pull data out from sql server and export xml file. The file is xml file. but it is not format very well to view it, it all jam together. I did try different way to export but all is same dtaa but not format well. Can someone help me for this? alt text

xml-format.png (48.5 kB)
more ▼

asked Dec 04, 2017 at 10:31 PM in Default

avatar image

SSGC
196 13 20 26

https://docs.microsoft.com/en-us/sql/relational-databases/xml/for-xml-sql-server

Going to need more information than that to help, will need schema, data, query and your expected outcome to give you specific answers.

Would start by looking at the link above and going through and looking at FOR XML AUTO/PATH/RAW/EXPLICIT

Dec 05, 2017 at 08:46 AM anthony.green
(comments are locked)
10|1200 characters needed characters left

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.

Topics:

x1095
x204
x17

asked: Dec 04, 2017 at 10:31 PM

Seen: 50 times

Last Updated: Dec 05, 2017 at 06:53 PM

Copyright 2018 Redgate Software. Privacy Policy