月 月河 Unregistered / Unconfirmed GUEST, unregistred user! 2008-03-02 #1 update 表 set 字段3=字段1/字段2<br>但字段1、字段2为整数,要求字段3结果为四位小数.....
X xhr Unregistered / Unconfirmed GUEST, unregistred user! 2008-03-02 #2 update 表 set 字段3=cast(字段1/字段2 as decimal(18,4))
C crazyflash Unregistered / Unconfirmed GUEST, unregistred user! 2008-03-03 #3 update 表 <br>set 字段3=<br>Cast(Cast(字段1 as decimal)/Cast(字段2 as decimal) as decimal(18,4) )
P power255 Unregistered / Unconfirmed GUEST, unregistred user! 2008-03-03 #4 update 表 set 字段3=((字段1+0.0)/(字段2+0.0) as decimal(18,4))
D datafans Unregistered / Unconfirmed GUEST, unregistred user! 2008-03-08 #5 update 表 set 字段3 = Cast(字段1 * 1.0 / 字段2 as numeric(18.4))<br>注意结果可能会溢出
D datafans Unregistered / Unconfirmed GUEST, unregistred user! 2008-03-08 #6 update 表 set 字段3 = Cast(字段1 * 1.0 / 字段2 as numeric(18,4))<br>注意结果可能会溢出
E esxpd Unregistered / Unconfirmed GUEST, unregistred user! 2008-03-09 #7 update 表 set 字段3 =iff(字段2=0,0,round(字段1/字段2,4))<br>结果就不会溢出了