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.
Author |
Topic |
shpinoza1980
Starting Member
17 Posts |
Posted - 2010-10-18 : 05:10:56
|
Hi, I'm trying to create an xml document out of a sql 2005 tableI use this code in a query:select p.name as "NAME"from nop_product pfor xml path('PRODUCT'),ROOT('STORE')my problem is that i need 3 level tree - all <PRODUCT> elements to be under <PRODUCTS> like this:<STORE> <PRODUCTS> <PRODUCT> <NAME> ..... </NAME> </PRODUCT> <PRODUCT> <NAME> ....... </NAME> </PRODUCT> </PRODUCTS></STORE>how do i do that? how do I add another permanent element after the ROOT tag and before the <PRODUCT> tag?thanks quote:
quote:
quote:
quote:
thanks a lot |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-10-19 : 13:39:10
|
howzz data present in your table?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
|
|
|