简体   繁体   English

从Excel中的数据类型为TIME的Excel导入到sql时出错

[英]error when import to sql from excel with data type TIME in SQL

Is there anyway to import data from excel with time data type sql manager is saying unknown column type 反正有没有从Excel导入时间数据类型为sql manager的数据说未知列类型

Found 4 unknown column type conversion(s)

The package will not be run.

图片

The Import Wizard internally uses SSIS for the Data Import. 导入向导在内部使用SSIS进行数据导入。 The Excel connection manager can only handle a few standard data types and it tries to make a best guess based on the first few rows of the Excel file. Excel connection manager只能处理几种标准数据类型,并且它会尝试根据Excel文件的前几行做出最佳猜测。

So in this case, try manually mapping the time column from Excel source to a DateTime column in your target SQL table. 因此,在这种情况下,请尝试将时间列从Excel源手动映射到目标SQL表中的DateTime列。

STEPS 脚步

  • In the Select Source Tables and Views dialog of the Import Wizard , select your Sheet in Source (left column) and the Target table (right column) in the Destination (right column). 导入向导选择源表和视图对话框中,选择的表(左列)和目标 (右列)目标表(右列)。
  • Click Edit Mappings . 单击编辑映射
  • Locate the column name for the Excel time column in the Source column list, and click the Type cell for it (next to destination column name). 在“ 源”列列表中找到Excel时间列的列名,然后单击它的“ 类型”单元格(在目标列名旁边)。
  • Change it to DateTime 将其更改为DateTime

Now proceed with the rest of the import. 现在继续其余的导入。

More Info: Excel Source 更多信息: Excel源

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM