Data import from Excel to SQL Server failing to import all data

前端 未结 11 1719
一向
一向 2021-02-04 07:26

I have an odd thing happening with importing data from Excel to SQL Server using the Import and Export Data tool.

The short of it is that I can see the data in Excel, bu

11条回答
  •  醉酒成梦
    2021-02-04 08:21

    it seems that the import tool from SSMS takes a sample of the first 'x' rows to decide the data type of the column and other characteristics of it, so if it chooses is double it will take the text values as null and if it reads it as text no number will show. If you have Microsoft Access you can first use the access import which allows you to choose your own column types and save it as an access file, then import the access to SQL server and 'voila', it works (at least for me), I hope it helps someone.

提交回复
热议问题