Link to home
Start Free TrialLog in
Avatar of GPSPOW
GPSPOWFlag for United States of America

asked on

Using BCP to output file as ANSI as UTF-8

net use P: \\pmcfs\groups

bcp "select * from livedb.dbo.tbl_RCA_DAILY_TXN_HEADERS" queryout "\\pmcfs\groups\ACCOUNTING\RCA_DAILY_TXN_HEADERS.csv" -T -SPTM-DR01 -w -t^|


bcp "select * from livedb.dbo.tbl_RCA_DAILY_TXN_DETAIL" queryout "\\pmcfs\groups\ACCOUNTING\RCA_DAILY_TXN_Temp.csv" -T -SPTM-DR01 -w -t^|

copy \\pmcfs\groups\ACCOUNTING\RCA_DAILY_TXN_HEADERS.csv + \\pmcfs\groups\ACCOUNTING\RCA_DAILY_TXN_Temp.csv  "\\pmcfs\groups\ACCOUNTING\CHI\DailyTxnData\rca_p1_mt_daily_txn_"%date:~10,4%%date:~4,2%%date:~7,2%".csv"

net use P: /DELETE


I use the above in a batch file to output my SQL tables to a pipe delimited file.  Now the thrid party vendor wants the output pipe delimted but in an ANSI as UTF-8 format.  Is there a way to modify the above code to guarantee this?

Thanks

Glen
ASKER CERTIFIED SOLUTION
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
The author did not get a solution from here, but he got a very good direction from angelII's comment. It is advised that author accept his own comment as answer without giving points to anyone. That will help anyone looking for the same problem.
Avatar of GPSPOW

ASKER

Method is invalid.