Cannot fetch a row from OLE DB provider “BULK” for linked server “(null)”

前端 未结 12 1542
粉色の甜心
粉色の甜心 2021-02-18 13:24

I try to load my database with tons of data from a .csv file sized 1.4 GB. But when I try to run my code I get errors.

Here\'s my code:

USE [Intradata N         


        
12条回答
  •  鱼传尺愫
    2021-02-18 13:32

    The bulk insert will not tell you if the import values will "fit" into the field format of the target table.

    For example: I tried to import decimal values into a float field. But as the values all had a comma as decimal point, it was unable to insert them into the table (it was expecting a point).

    These unexpected results often happen when the provided CVS value is an export from an Excel file. Your computer's regional settings will decide which decimal point will be used when saving an Excel file into a CSV. CSV's provided by different people will cause different results.

    Solution: import all fields as VARCHAR, and try to deal with the values afterwards.

提交回复
热议问题