Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Build XML from database

Status
Not open for further replies.

daNewfie

Programmer
Oct 14, 2004
258
CA
how do I create an xml file based on information in my sql database table.

I never used xml before, I hope this is possible.

Craig
 
Sure - google "for xml explicit":


example:

select 1 as Tag,
null as Parent,
Foo as [Foo!1!Foo_e],
Bar as [Bar!2!Bar_e!element]

Union all

select 2 as Tag,
1 as Parent,
Foo as [Foo!1!Foo_e],
Bar as [Bar!2!Bar_e!element]

for xml explicit


untested - sommat like that

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top