问题
I have the following T-SQL statement:
BULK INSERT #TempTable
FROM "C:\csvfile.csv"
WITH ( FIELDTERMINATOR = ',', ROWTERMINATOR ='\n', FIRSTROW = 2, KEEPIDENTITY )
I am test running it on a 3 row csv file, of which the first row contains the headers. So there are 2 data rows.
However, it only reads line 2 and never line 3.
Any idea why?
回答1:
A line break was needed after the last row. Ugh.
来源:https://stackoverflow.com/questions/10317210/bulk-insert-from-csv-does-not-read-last-row