I am trying to do a bulk insert and SQL server database table. The code i am using is as follows.
BULK INSERT dbo.UKGeocodes
FIRSTROW = 2,
FIELDTERMINATOR = ',',
ROWTERMINATOR = '\n'
I know this insert works as i am using it for another process, and the Field and Row Terminators also have the correct values assigned to them for the file i am trying to insert.
The CSV file is very large with 1.9 million rows so i cannot open it up fully in Microsoft Excel and make changes to the file as the size is beyond the Excel Row limit.
These are the errors that i am getting;
Msg 4866, Level 16, State 8, Line 3
The bulk load failed. The column is too long in the data file for row 1, column 13. Verify that the field terminator and row terminator are specified correctly.
Msg 7301, Level 16, State 2, Line 3
Cannot obtain the required interface ("IID_IColumnsInfo") from OLE DB provider "BULK" for linked server "(null)".