文本被截断或一个或多个字符在目标代码页 ole db 源到平面文件目标中没有匹配项 [英] Text was truncated or one or more characters had no match in the target code page ole db source to flat file destination

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

问题描述

我正在将表输出导出到 CSV 文件.我正在使用具有 OLE DB 源和平面文件目标的 SSIS 包来做这件事.我收到以下错误:

I'm exporting a table output to a CSV file. I'm doing it using SSIS package which has OLE DB Source and Flat File Destination. I'm getting the following errors:

[平面文件目标 [2]] 错误:数据转换失败.地址"列的数据转换返回状态值 4 和状态文本文本被截断或一个或多个字符在目标代码页中不匹配.".

[Flat File Destination [2]] Error: Data conversion failed. The data conversion for column "Address" returned status value 4 and status text "Text was truncated or one or more characters had no match in the target code page.".

[平面文件目标 [2]] 错误:无法复制或转换列地址"的平面文件数据.

[Flat File Destination [2]] Error: Cannot copy or convert flat file data for column "Address".

[SSIS.Pipeline] 错误:SSIS 错误代码 DTS_E_PROCESSINPUTFAILED.组件平面文件目的地"上的 ProcessInput 方法(2) 处理输入平面文件目标输入"时失败,错误代码为 0xC02020A0;(6).标识的组件从 ProcessInput 方法返回错误.该错误是特定于组件的,但该错误是致命的,会导致数据流任务停止运行.在此之前可能会发布错误消息,其中包含有关失败的更多信息.

[SSIS.Pipeline] Error: SSIS Error Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method on component "Flat File Destination" (2) failed with error code 0xC02020A0 while processing input "Flat File Destination Input" (6). The identified component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running. There may be error messages posted before this with more information about the failure.

[OLE DB 源 [9]] 错误:尝试向数据流任务缓冲区添加行失败,错误代码为 0xC0047020.

[OLE DB Source [9]] Error: The attempt to add a row to the Data Flow task buffer failed with error code 0xC0047020.

[SSIS.Pipeline] 错误:SSIS 错误代码 DTS_E_PRIMEOUTPUFAILED.OLE DB 源上的 PrimeOutput 方法返回错误代码 0xC02020C4.当管道引擎调用 PrimeOutput() 时,组件返回失败代码.失败代码的含义由组件定义,但错误是致命的,管道停止执行.在此之前可能会发布错误消息,其中包含有关失败的更多信息.

[SSIS.Pipeline] Error: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on OLE DB Source returned error code 0xC02020C4. The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing. There may be error messages posted before this with more information about the failure.

谁能给点建议?

推荐答案

@user7396598

@user7396598

感谢您为我指明了正确的方向.所以我进行了比较,记录似乎只以相同的顺序插入,直到它们不匹配之后.我可以捕获不良数据.通过运行以下命令:select * from table where address != cast(address as varchar(1000)),当我删除我的 SSIS 打包的坏数据时.

Thank you for pointing me in the right direction. So I ran a comparison the records seem to be inserting in the same order only until a point then after they are not matching. I could captured the bad data. by running the following: select * from table where address != cast(address as varchar(1000)), when I removed the bad data my SSIS packaged worked.

现在我需要弄清楚如何将坏数据转换为 CSV 可接受的格式.

Now I need to figure out how to convert the bad data into acceptable format for the CSV.

参考 - https://stackoverflow.com/a/2683496/8452633

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

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