SSIS 数据流将 Float 转换为 NVarchar 并导入空值

发布于 2024-11-17 17:26:35 字数 285 浏览 6 评论 0原文

我正在尝试将 Excel 2007 电子表格导入临时表,但遇到了某些列类型的问题。我的一些列具有数字和文本值的组合,即名为“客户编号”的列可以具有数字值(例如 1234、32432433)或文本值(例如 A1000、ACC101TEXT)。当我导入电子表格时,其中包含文本的值返回 null,而数值则正确导入。此外,最后一行在该列中有我需要的文本描述,但是导入后,该行值为空。我可以做些什么来纠正这种情况并按原样导入电子表格吗?我尝试过使用数据流转换中的数据转换,但是,这仍然不起作用。请注意,我无法更改或格式化 Excel 电子表格。任何帮助将不胜感激。

I am trying to import an Excel 2007 spreadsheet into a staging table and I am encountering issues with some of the column types. Some of my columns have a combination of numeric and text values i.e. A column called Customer No can have numeric values such as 1234, 32432433, or text values i.e. A1000, ACC101TEXT. When I import my spreadsheet, the values with text in them are returning null whereas the numeric values are being imported properly. Moreover, the last row has a text description in this column that I need, however, after the import, this row value is null. Is there anything I can do to rectify the situation and import the spreadsheet as is? I've tried using data conversions from the data flow transformation, however, that is still not working. Please note, I cannot change or format the excel spreadsheet. Any help would be greatly appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

魂归处 2024-11-24 17:26:35

您需要使用高级编辑器告诉 Excel 源该列是 Unicode 字符串,而不是数字。这就是字母数字字段为空的原因。

  1. 右键单击 Excel 源并选择高级编辑器
  2. 选择第四个选项卡“输入和输出属性”
  3. 选择“输出列”下的相关列并将源更改为 Unicode

这应该可以解决您的问题。

You need to use the Advanced Editor to tell the excel source the column is a Unicode String, not a numeric. That is why alphanumeric fields are null.

  1. Right-click on the Excel Source and choose advanced editor
  2. Choose the fourth tab "Input and Output Properties"
  3. Choose the column in question under the "Output Columns" and change the source to Unicode

That should fix your problem.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文