SQLTeam.com | Weblogs | Forums

Export separate rows to xml file with

tsql
sql2014

#1

for exporting to xml file i use:
bcp "select * from table'" queryout C:\filename.dat -S @@servername -t -c -C 65001 -T
the result in the created file appears in one long row like:
"<Payment_group>100201301</Payment_group>"

how can i force it to appear in separate rows like:

"<Payment_group>
100
201301
</Payment_group>"

thanks ahead