3

我们在我们的 sql 服务器上使用非 unicode。我们使用 ssis 进行了大量的 excel 文件导入,我们花费了大量时间将 excel unicode 映射到我们的 sql server 非 unicode 列。在 ssis 中是否有一些地方可以设置默认值或某个选项,以便 SSIS 可以默认将其源 unicode 列映射到它检测到 unicode 的目标非 unicode ?此链接显示了我们现在执行的步骤。最好在 ssis 中有一个选项说“在导入 excel 文件时使用这个模板..”或类似的东西。我相信你们中的很多人通过 ssis 导入 excel 文件,我希望你们能提供一些这方面的提示。谢谢你

4

3 回答 3

1

There is no mechanism around the way in which the Excel Connection Manager treats text. It is going to treat text in the safest manner possible by assuming it's Unicode. The only option you have with the Connection Manager is exactly what you are doing.

An alternative however, would be to disregard the Excel Connection Manager and use an OLE Connection manager as I describe in this answer. Excel Source as Lookup Transformation Connection

Instead of sending that data to a Cache Connection Manager, just a query to pull data in from your spreadsheet and your conversion issues should be a distant memory.

于 2012-07-01T01:20:01.403 回答
0

您是否尝试过配置平面文件连接管理器并在那里更改每列的类型,这可能是一个选项。

于 2012-06-28T20:17:22.850 回答
-1

使用 .csv 文件,平面文件连接管理器默认使用 DT_STR。

于 2020-04-15T10:44:35.010 回答