【发布时间】:2015-12-15 19:50:42
【问题描述】:
奇怪的错误,在 2012 Enterprise Edition db 上使用 SSIS 2010。 使用 OLEDB 连接。
变量 a,b,c 在 ssis 中定义为 Decimal。 d 被定义为一个字符串。
Sql 任务:
Select min(col1),max(col1) from table_a
where key_value = ?
where: parameter 0 is d , data type=Varchar
resultset 1 is a , 2 is b
表达任务:
@[User:c] = (DT_DECIMAL,2) (@[User:a] + @[User:b])
Sql 任务:
Update table_a
set col2 = ?
where key_value = ?
where: parameter 0 is c (DataType=DECIMAL) and 1 is d (DataType=Varchar)
错误:...失败并出现以下错误:“类型不是 支持.DBTYPE_DECIMAL”。可能的失败原因:问题与 查询,“ResultSet”属性设置不正确,参数不正确 设置正确,或未正确建立连接。
table_a 定义为
d varchar(4),
col1 numeric(10,2),
col2 numeric(10,2)
d 有多行,表上没有索引... 我已经尝试在更新语句中转换和转换值 任何想法有什么错误? 谢谢
【问题讨论】:
标签: sql-server ssis sql-update