“Column is too long” error with BULK INSERT

前端 未结 4 1176
不思量自难忘°
不思量自难忘° 2020-12-16 10:48

I am trying to run the following command to bulk insert data from a CSV file--

 BULK INSERT TestDB.dbo.patent
 FROM \'C:\\1patents.csv\'
 WITH (FIRSTROW = 1,         


        
4条回答
  •  误落风尘
    2020-12-16 11:12

    Like answered above, I had the same problem importing a csv file into SQL Server. I was using ROWTERMINATOR = '\n' and I also tried to use '\r\n' and '\r'. None of them worked.

    But when using ROWTERMINATOR = '0x0a' the table loaded without problems.

    I don't know the "why?" behind this, hopefully somebody else can shed light over it.

提交回复
热议问题