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)
 building an xml based on a table

Author  Topic 

pelegk2
Aged Yak Warrior

723 Posts

Posted - 2007-03-13 : 12:17:03
how can i build and xml that will be a result of a query,
where the result will be an xml will key's that there values from rows in the db and so on?
does any 1 know of an article that explain it?
thanks in advance
peleg

Israel -the best place to live in aftr heaven 9but no one wan't to go there so fast -:)

Clages1
Yak Posting Veteran

69 Posts

Posted - 2007-03-13 : 16:24:53
Hi , Take a Look at sp_makewebtask in bol
and sp_xml_preparedocument
Clages

Go to Top of Page

snSQL
Master Smack Fu Yak Hacker

1837 Posts

Posted - 2007-03-13 : 16:50:57
It's pretty simple with the FOR XML clause of the SELECT statement, for example

SELECT * FROM pubs..authors FOR XML AUTO
Go to Top of Page
   

- Advertisement -