Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Export SQL data into XML

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2004-09-10 : 08:37:23
AP writes "I have to export data from three SQL tables (relational) to a single XML file, is it possible using a SQL query? Here's the sample;

Header table contains header info (id)
Header detail table contains header details (id, part)

XML should look like this;

<Header>
<id>1<id>
</Header>
<Detail>
<part>xxx<part>
</Detail>
<Detail>
<Part>yy<part>
</Detail>
....."

ehorn
Master Smack Fu Yak Hacker

1632 Posts

Posted - 2004-09-10 : 09:27:20
This can be done. Have a look at "FOR XML" and "EXPLICIT MODE" in SQL BOL.
Go to Top of Page
   

- Advertisement -