I am getting this error when trying to do a bulk insert of a text file
Bulk Insert fails. Column is too long in the data file for row 1, column 4.
Make sure the field terminator and row terminator are specified correctly.
Here is my SQL statement:
BULK INSERT MPI
WITH (FIELDTERMINATOR = '|', ROWTERMINATOR = '\n', DATAFILETYPE = 'CHAR', BATCHSIZE = 800000, ORDER( unit_num ASC), TABLOCK)
What's wierd is that if I go an open the file in wordpad and save it, then try the bulk insert again it succeeds with no problems. The file is initially transferred from a remote server via ftp. I'm thinking that the rowterminator is different than \n initially before I open it in wordpad, but I don't know how to determine what it is.