sqlcmd for xml
Posted on 2014-08-28
I have an external .sql file which works 100% is SSMS, which produces well formed xml. However, as soon as I try and create a sql job the out put is on continous string, as apposed to well formed xml.
here is the cmd being called inside the job:
sqlcmd -X -h-1 -y 0 -i "D:\API\Export\MessagesXML.sql" -d dbname -S localhost\instance -o "D:\API\Export\Messages.xml"
This is being run as a 'Operating System (CmdExec) job, any help would be appreciated.