Home Forums SQL Server 2005 T-SQL (SS2K5) export in xml RE: export in xml
gbritton1
SSCertifiable
Points: 6522
More actions
June 4, 2014 at 8:17 am
#1718846
try this:
select 0 as [@id]
, (select 'Valuta' as [@name]
, Valuta as [@value]
from #prova
for xml path('dim'), type)
, (select 'Misura' as [@name]
, Misura as [@value]
for xml path('obs'), root('root')