导入包错误 - 无法在 Unicode 和非 Unicode 字符串数据类型之间转换 [英] Import Package Error - Cannot Convert between Unicode and Non Unicode String Data Type

查看:26
本文介绍了导入包错误 - 无法在 Unicode 和非 Unicode 字符串数据类型之间转换的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 SQL Server 2008 在我的计算机上制作了一个 dtsx 包.它将数据从分号分隔的 csv 文件导入到一个表中,其中所有的字段类型都是 NVARCHAR MAX.

I have made a dtsx package on my computer using SQL Server 2008. It imports data from a semicolon delimited csv file into a table where all of the field types are NVARCHAR MAX.

它可以在我的电脑上运行,但需要在客户端服务器上运行.每当他们使用相同的 csv 文件和目标表创建相同的包时,就会收到上述错误.

It works on my computer, but it needs to run on the clients server. Whenever they create the same package with the same csv file and destination table, they receive the error above.

我们已经一步步完成了包的创建,一切看起来都很好.映射都是正确的,但是当他们在最后一步运行包时,他们收到这个错误.他们使用的是 SQL Server 2005.

We have gone through the creation of the package step by step, and everything seems OK. The mappings are all correct, but when they run the package in the last step, they receive this error. They are using SQL Server 2005.

谁能建议从哪里开始寻找这个问题?

Can anyone advise where to begin looking for this problem?

推荐答案

从任何非 unicode 源转换为 unicode SQL Server 表的问题可以通过以下方式解决:

The problem of converting from any non-unicode source to a unicode SQL Server table can be solved by:

  • 向数据流添加数据转换转换步骤
  • 打开数据转换并为适用的每种数据类型选择 Unicode
  • 注意每个适用列的输出别名(默认情况下它们被命名为 [原始列名称] 的副本)
  • 现在,在目标步骤中,点击映射
  • 将所有输入映射更改为来自上一步中的别名列(这是很容易被忽视的步骤,会让您想知道为什么仍然遇到相同的错误)

这篇关于导入包错误 - 无法在 Unicode 和非 Unicode 字符串数据类型之间转换的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆