Truncation errors importing to SQL Server 2005 from Excel

后端 未结 7 1281
一整个雨季
一整个雨季 2020-12-31 05:38

Long story short, I\'m taking a bunch of excel documents one by one, and importing them using the Import/Export wizard into a database in SQL Server 2005.

Here\'s on

7条回答
  •  一向
    一向 (楼主)
    2020-12-31 06:14

    In SQL Server Import Wizard as soon as you get to the section where you need to specify the file you are using to import data click on the "Advanced" options. This will show you all the fields in your input file together with the field properties. The property you need to change is "DataType". It usually defaults to "string[DT_STR]". If you change it to "text stream[DT_TEXT]" you will increase the size of the field substantially and therefore will most likely avoid the truncation error.

提交回复
热议问题