尝试使用 导入值时数据转换失败。精确
Data conversion fails when trying to import values with . precision
我有以下 csv 文件:
EmployeeId,PayRate
12,2.50
15,5.33
56,7.28
我正在尝试将数据存储在 SQL 服务器 table 中,如下所示:
使用转换组件:
"The value could not be converted because of a potential loss of
data."
使用派生列:
ISNULL(PayRate) ? (DT_R4)0.00 : (DT_R4)PayRate
SSIS 错误代码 DTS_E_INDUCEDTRANSFORMFAILUREONERROR。
The "Derived Column" failed because error code 0xC0049063 occurred,
and the error row disposition on "Colonne dérivée.Entrées[Entrée de
colonne dérivée].Colonnes[PayRate]" specifies failure on error.
我找不到在我的情况下用于存储 PayRate 的正确类型。
我最终使用派生列将 .
替换为 ,
:
REPLACE(PayRate,".",",")
然后转换为DT_NUMERIC
:
我有以下 csv 文件:
EmployeeId,PayRate
12,2.50
15,5.33
56,7.28
我正在尝试将数据存储在 SQL 服务器 table 中,如下所示:
使用转换组件:
"The value could not be converted because of a potential loss of data."
使用派生列:
ISNULL(PayRate) ? (DT_R4)0.00 : (DT_R4)PayRate
SSIS 错误代码 DTS_E_INDUCEDTRANSFORMFAILUREONERROR。
The "Derived Column" failed because error code 0xC0049063 occurred, and the error row disposition on "Colonne dérivée.Entrées[Entrée de colonne dérivée].Colonnes[PayRate]" specifies failure on error.
我找不到在我的情况下用于存储 PayRate 的正确类型。
我最终使用派生列将 .
替换为 ,
:
REPLACE(PayRate,".",",")
然后转换为DT_NUMERIC
: