【发布时间】:2020-11-23 20:43:19
【问题描述】:
因此,我需要将 CSV 文件中的数据加载到 SQL Server 中,但我遇到了一个似乎无法克服的问题。问题是,CSV 上的一些数据点非常精确,有 38 个十进制数字 + 一个或两个整数(例如 89.95849436456480407115801673479014153261),我似乎无法加载它们而不溢出数据。数据以文本形式出现,我尝试在数据转换步骤将其转换为最大值 Numeric(38,38),但仍然不够,并且不断溢出。以下是错误消息的一部分:
Error: 0xC02020C5 at Data Flow Task, Data Conversion [2]: Data conversion failed while converting column "%Recycle Matl Week" (216) to column "%Recycle Matl Week" (61). The conversion returned status value 2 and status text "The value could not be converted because of a potential loss of data.".
Error: 0xC0209029 at Data Flow Task, Data Conversion [2]: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "Data Conversion.Outputs[Data Conversion Output].Columns[%Recycle Matl Week]" failed because error code 0xC020907F occurred, and the error row disposition on "Data Conversion.Outputs[Data Conversion Output].Columns[%Recycle Matl Week]" 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.
Error: 0xC0047022 at Data Flow Task, SSIS.Pipeline: SSIS Error Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method on component "Data Conversion" (2) failed with error code 0xC0209029 while processing input "Data Conversion Input" (3). 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.
我真的被这个问题困住了,我总觉得这是一个简单的解决方案,但就是不明白。从源代码更改 CSV 是不行的,但我在这里真的不需要那么高的精度(8 个十进制数字就足够了)。非常感谢我能得到的任何帮助,谢谢!
【问题讨论】:
标签: csv ssis type-conversion overflow