读书人

对数据类型而言运算符无效。运算符为

发布时间: 2012-03-30 17:32:09 作者: rapoo

对数据类型而言运算符无效。运算符为 multiply,类型为 varchar。
UPDATE fc_rk_jl_t
SET JE=sl*dj
where fc_rk_id in (select id from fc_rk_t where BH='富-2011-05-0091') and dj='360.0000'


消息 403,级别 16,状态 1,第 1 行
对数据类型而言运算符无效。运算符为 multiply,类型为 varchar。

这个无法计算,,请告知下

[解决办法]

SQL code
UPDATE fc_rk_jl_tSET JE=sl*convert(decimal(18,4),dj)where fc_rk_id in (select id from fc_rk_t where BH='富-2011-05-0091') and dj='360.0000'
[解决办法]
SQL code
UPDATE fc_rk_jl_tSET JE=sl*cast(dj as decimal(18,4))where fc_rk_id in (select id from fc_rk_t where BH='富-2011-05-0091') and dj='360.0000' 

读书人网 >SQL Server

热点推荐