SSIS 平面文件源 - 文本被截断或目标代码页中的一个或多个字符不匹配 [英] SSIS Flat-file source - Text was truncated or one or more characters had no match in the target code page

查看:23
本文介绍了SSIS 平面文件源 - 文本被截断或目标代码页中的一个或多个字符不匹配的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将记录从逗号分隔的平面文件导入 SQL 数据库文件,但收到文本被截断或目标代码页中的一个或多个字符不匹配"的消息.当源文件的特定字段超过 50 个字符时.该字段的目标文件目标是 1000 个字符,因此这应该不是问题.我将其缩小到文本文件中的A123456789B123456789C123456789D123456789E123456789"确实导入,而A123456789B123456789C1234567486E5589D"抛出了错误4856787889.

如何在截断之前让它允许更多字符?

解决方案

我在第二个答案中找到了答案:正在将 CSV 文件导入 SQL 服务器...感谢 Eoan.

最终,在源数据文件的高级编辑器中,在输入和输出属性选项卡上的外部列下,有一个默认为 50 的长度属性.更改它以匹配目标数据库文件就成功了.

>

I'm trying to import records into an SQL database file from a comma-delimited flat file and I get a "Text was truncated or one or more characters had no match in the target code page." when the source file has more than 50 characters in a particular field. The Destination file target for that field is 1000 characters, so that shouldn't be an issue. I narrowed it down to "A123456789B123456789C123456789D123456789E123456789" in the text file did import while "A123456789B123456789C123456789D123456789E123456789F" threw the error.

How can I get it to allow more characters before truncating?

解决方案

I found the answer in the second answer to: Importing CSV file into SQL server... Thanks to Eoan for that.

Ultimately, in the Advanced Editor of the source datafile, on the Input and Output Properties tab, under External Columns, there is a Length property that defaults to 50. Changing that to match the Target Database File did the trick.

这篇关于SSIS 平面文件源 - 文本被截断或目标代码页中的一个或多个字符不匹配的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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