'1000以下数量'=sum(case when ((je <=1000 and je>0) or (je >=-1000 and je<0)) and (xsh like'01%' or xsh like'04%') then sl else 0 end), '1000以下折算量'=sum(case when ((je <=1000 and je>0) or (je >=-1000 and je<0)) and (xsh like'01%' or xsh like'04%') then cast((sl*6/10) AS decimal(18, 0)) else 0 end), 上面两个怎么出来的结果一样的,当cast((sl*6/10) AS decimal(18, 1))这个表达式有小数点时,就结果又是对的,不知道怎么回事,请指点。
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货