This is the BCP command I use for inserting data in SQL server:
bcp sfnav.dbo.Customer in "C:\Users\TSL\Desktop\TSL Data\ID_Customer_151124.csv" -F2 -c -t "^" -r "\n" -S ftpserver\sqlexpress -U abc -P xyz
When I try to run the same command in a batch file it results in an error:
call bcp sfnav.dbo.Customer in "C:\Users\TSL\Desktop\TSL Data\ID_Customer_151124.csv" -F2 -c -t "^" -r "\n" -S ftpserver\sqlexpress -U abc -P xyz
Error:
Starting copy... SQLState = 22001, NativeError = 0 Error = [Microsoft][ODBC Driver 11 for SQL Server]String data, right truncation SQLState = 22001, NativeError = 0