Home Forums Article Discussions Article Discussions by Author Discuss Content Posted by Jacob Sebastian XML Workshop - FOR XML PATH RE: XML Workshop - FOR XML PATH
jacob sebastian
SSChampion
Points: 11822
More actions
April 20, 2010 at 8:41 pm
#1155057
try this
SELECT (
select
*,
(
select * from account a
where a.business_id = b.business_id
for xml path('account'), root('accounts'), type
)
from business b
for xml path(''), root('Small_Business'),TYPE
FOR XML PATH('Business_Type'), ROOT('XMl')
.