i'm running bcp to output some MSSQL table content to XML. i can get the xml output file fine but am having problems with the insertion of the <root> open and close tags.
the code that I'm using is as per various threads that i've found on the net, but i get an 'unknown argument on command line' error as follows...
unknown argument 'rootopen.txt+m yfile.xml+rootc ls.txt' on command line.
the code i am using is...
the xml output file is produced and saved in the same directory as where the rootopen.txt and rootcls.txt files are saved, however the subsequent copy process to merge all 3 files doesn't appear to work.
any ideas?
the code that I'm using is as per various threads that i've found on the net, but i get an 'unknown argument on command line' error as follows...
unknown argument 'rootopen.txt+m yfile.xml+rootc ls.txt' on command line.
the code i am using is...
Code:
bcp "SELECT * FROM DBNAME..TABLENAME FOR XML RAW" queryout myfile.xml -SSERVERNAME -T -c -r -t copy/b rootopen.txt+myfile.xml+rootcls.txt myfile.xml
any ideas?
Comment