由于可能会丢失数据,因此无法转换该值。 [英] The value could not be converted because of a potential loss of data.

查看:98
本文介绍了由于可能会丢失数据,因此无法转换该值。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello all,

Hello all,

我正在努力将记录从.DAT文件移动到SQL Server数据库。当我运行我的包时,我收到错误:由于可能丢失数据而无法转换该值。"

I'm working on moving records from a .DAT file to a SQL Server DB. When i run my package, i get the error:The value could not be converted because of a potential loss of data."

当我看到来自文件的数据时,列有02000应该是数字(5,2) 转换后,也就是我的表格的目标字段的数据类型。 我已经尝试了忽略失败,但我仍然得到
相同的东西。

When i see the data coming from the file, the column has 02000 which is supposed to be a numeric(5,2)  after the conversion, and also that is the data type for the destination field of my table.  i've tried the ignore failure but still i get the same thing.

如何解决这个问题?

提前致谢!

推荐答案

如果您在错误输出中给出了忽略失败选项并仍然得到错误,则表示错误可能由于列值不同而发生。

If you gave Ignore failure option in the Error Output and still get the error, then that means error might be happening due to different column value.

尝试设置Redirect row选项并重定向到错误表/文件,以了解哪一行失败以及哪些值是导致失败。

Instead of using ignore failure option, try setting Redirect row option and redirect to a error table/ file to understand which row is failing and what values are causing the failure.


这篇关于由于可能会丢失数据,因此无法转换该值。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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