sybase截取小数点的问题
当小数点后面是4个0,例如1.0000
怎么把后面的四个0去掉,变成1
只有当小数位后都是4个0的情况,1.0001则不变
[解决办法]
select case when (round(1.0001,4)=1.0001) then floor(1.0001) else round(1.0001,0) end
[解决办法]
select case
when A>0 then
case A-floor(A)
when 0 then floor(A)
else A
end
when A<0 then
case A-ceiling(A)
when 0 then ceiling(A)
else A
end
from XXXXXXXXXXxx
[解决办法]