Someone changed the row and column delimiters in BCP files I was working with. Actually, clumn used to be |~ and row was deafult \n and didn’tneed specification. I can’t seem to run BCP on the files now without an error.
When I run this now with the below command I get: “Invalid character value for cast specificatoin.”
Here’s my exact command syntax, I just changed the passwords, etc:
bcp Temp.dbo.Fund in D:\some_ftp_files\Unzipped\filename_58.bcp
-eD:\Error.txt -w -t"|^|" -r"|!|" -Usomename -Psomepass
Anyone see what I might be doing wrong?
I was going to just close this, but somoene might find it useful since I missed the obvious myself.
the -r”|!|” was in fact set as the row delimiter. Unfortunately, the file maker also retained the presence of the \n at the end.
This is made more confusing because SQL Server Bulk Import figures this out even if you don’t specify the extra \n. BCP and other bulk insert methods require you to actually say: -r”|!|\n”. So, if you notice the difference like I did, you think there’s a syntax error in your BCP call or that it’s not parsing right.