SQL语句中进行计算的数据精度问题
UPDATE hy_2d_fstemp_b SET
iorimoney=1700*(1-10/100),
iprice=1700*(1-10/100),
ioricost=1700*(1-10/100)/300,
iunitcost=1700*(1-10/100)/300,
ioritaxcost=1700/300,
ioritaxprice=1700*(10/100),
itaxprice=1700*(10/100),
iorisum=1700,
isum=1700
WHERE cinvcode='01'
UPDATE hy_2d_fstemp_b SET
iorimoney=CAST(1700*(1-10/100) AS DECIMAL(30,2)),
iprice=CAST(1700*(1-10/100) AS DECIMAL(30,6)),
ioricost=1700*(1-10/100)/300,
iunitcost=1700*(1-10/100)/300,
ioritaxcost=1700/300,
ioritaxprice=1700*(10/100),
itaxprice=1700*(10/100),
iorisum=1700,
isum=1700
WHERE cinvcode='01'