我有一个SSIS包,可以从Excel文档导入到数据库表.我收到以下错误:
[Excel Source [1]] Error: There was an error with output column "ShipTo" (47) on output
"Excel Source Output" (9). The column status returned was: "The value could not be
converted because of a potential loss of data.".
[Excel Source [1]] Error: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The
"output column "ShipTo" (47)" failed because error code 0xC0209072 occurred, and the
error row disposition on "output column "ShipTo" (47)" specifies failure on error. An
error occurred on the specified object of the specified component. There may be error
messages posted before this with more information about the failure.
[SSIS.Pipeline] Error: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method
on component "Excel Source" (1) returned error code 0xC0209029. 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.
Run Code Online (Sandbox Code Playgroud)
我已经阅读并找到文章以确保我的数据类型匹配,并且我已经完成了.在Excel文档中,有184行,并且在这些错误(shipto)中列出的列中,它们都具有相同的值,即"全部".我最后一次运行时遇到了这个问题,但只有4行有"全部",所以我只是手动输入了这些值,但这次效率不高.
在目标表上,ShipTo列是一个Varchar(20),所以我看不到大小是一个问题,因为它是三个东西之一:1位数字,2位数字或单词All.
有没有人有任何其他的想法,我可以尝试?任何帮助是极大的赞赏.感谢任何可以提供任何帮助的人.
Wil*_*man 27
当您第一次设置此软件包时,我猜测一个或两个数字的数字是ShipTo列中的第一个值.您从Excel中读取的包选择了该输入字段的数字类型,并且单词"ALL"使包失败,因为该字段的输入规范是数字.有几种方法可以事先解决这个问题,但要事后修复它,最简单的方法是右键单击Excel Source并选择Show Advanced Editor ...从那里,选择显示输入和输出属性的选项卡.在该对话框的输入和输出部分的最顶部,找到ShipTo列.您将不得不向下钻取以找到它.将DataType设置为"string [DT_STR]",长度为20.
单击"确定",然后再次尝试运行包.
| 归档时间: |
|
| 查看次数: |
90594 次 |
| 最近记录: |