Avatar of GPSPOW
GPSPOW
Flag 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
Programming

Avatar of undefined
Last Comment
GPSPOW

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Guy Hengel [angelIII / a3]

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
GPSPOW

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Harish Varghese

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.
GPSPOW

ASKER
Method is invalid.
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck