I'm new to sql server and I simply need to get data out of a sql server table into XML format using FOR XML AUTO, ELEMENTS.
When I use the query analyzer or enterprise manager, the XML appears as a stream, for example:
<Customers><CID>100</CID><CO>Name</CO></Customers><Customers><CID>....
Instead, how do I get the output to appear as:
<Customers>
<CID>100</CID>
<CO>Name</CO>
</Customers>
<Customers>
<CID>
Ideally, I'd like the output spooled to a file.
I apologize for such a basic question. Thanks.
When I use the query analyzer or enterprise manager, the XML appears as a stream, for example:
<Customers><CID>100</CID><CO>Name</CO></Customers><Customers><CID>....
Instead, how do I get the output to appear as:
<Customers>
<CID>100</CID>
<CO>Name</CO>
</Customers>
<Customers>
<CID>
Ideally, I'd like the output spooled to a file.
I apologize for such a basic question. Thanks.