select @cmd = ' bcp "select * from #temp_table row for xml auto, root(''rows''), elements" ' + 'queryout "C:\Users\ss\Desktop\XML\sample.xml" -S -c -r -t'; exec xp_cmdshell @cmd
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)