Search code examples
sql-serversql-server-2012bcp

BCP import only half of csv file


I have a problem with BCP. I try to import CSV file to table through view as below:

bcp vImport in "CSV\data.csv" -U[user] -P[password] -S[server] -ddb -c -t; -F2 -e"CSV\error.err"

The file contains about 900 rows, but BCP has loaded only 400 rows. I was looking for parameter or Db setting, but without success.

I cut the file to 400 rows than BCP loaded 200 rows.


Solution

  • The reason was that source table has got one more column than csv file so last column of table was filled with next row from csv file.