SQL Server Bullk insert only imports half of file

jmo0nnb3  于 2023-11-16  发布在  其他
关注(0)|答案(1)|浏览(84)

I am executing a bulk insert that has worked fine up until today, nothing out of the ordinary, using the following code:

BULK
INSERT my_table
FROM 'e:\transfer\my_import.csv'
WITH
(
FIRSTROW = 2,
FIELDTERMINATOR = ',',
ROWTERMINATOR = '\n',
ERRORFILE = 'e:\transfer\my_errors.csv'
)
GO

The bulk insert is only importing half of the file each time however is not erroring. It is importing exactly 50% of the rows in the CSV file. So far I have tried:

  1. Pasting the contents of the CSV file underneath itself to effectively double up the file. This imports the first half as before, which in this case is the whole original file
  2. Setting First and Last row to skip the first 3 and last 3 - no effect, still imports first half only
  3. Deleting the middle few rows from the CSV file in case any rogue characters were indicating end of file - again, no errors, just imports half of a (slightly smaller) file.

I'm stumped as to why this could be happening!

zzlelutf

zzlelutf1#

After "FROM 'e:\transfer\my_import.csv'", type a space and the word truncover.

相关问题