4864: Bulk load data conversion error (type mismatch or invalid character)
SQL ServerWhat does it mean?
During a bulk load (BULK INSERT, bcp or OPENROWSET(BULK...)), a field in the source file could not be converted to the target column's data type. The data in the reported row/column does not match the expected type.
Why does it happen?
A value in the source data file does not fit the target column type: text in a numeric column, wrong date format, unexpected decimal/thousands separator, wrong character encoding (UTF-8/UTF-16), or columns shifting due to wrong field/row terminators. Not skipping the header row is also a common cause.
How to fix it
Go to the row and column reported by the error and inspect the source data. Match the field (FIELDTERMINATOR) and row (ROWTERMINATOR) terminators to the file; use FIRSTROW=2 to skip the header row. Set CODEPAGE or DATAFILETYPE for the correct code page/encoding. Make date/number formats compatible with the target type. Using a format file makes the mapping reliable.