I want to wrap xml from a column in an out query for xml without the column name as an element.
declare @tab table (col xml)
insert @tab
select '<element/>'
select 'val' AS "@att" , col
from @tab
for xml path ('ROOT')
This gives
<ROOT att="val">
<col>
<element />
</col>
</ROOT>
but I want
<ROOT att="val">
<element />
</ROOT>
All help is most appreciated.
Jules source
share