小第在做项目时遇到如下困难:
在pl/sql developer中对orcale 9i进行如下操作:
select sum(e.dealvalue) totaloutput from expend e,trainclass t
where (e.classid=t.id and e.depid=1) and (extract(month from e.time)=7)
and (extract(year from e.time)=2007)
and t.plankind=1
得出结果为:63509但同样的语句用在JAVA中调用后输出结果确变成了:
63509.000000000004经过检查,数据库中并未存储过这么长的小数,最多只有两个到小数点后一位的数字.不知是什么原因,请大家帮忙,谢谢.
在pl/sql developer中对orcale 9i进行如下操作:
select sum(e.dealvalue) totaloutput from expend e,trainclass t
where (e.classid=t.id and e.depid=1) and (extract(month from e.time)=7)
and (extract(year from e.time)=2007)
and t.plankind=1
得出结果为:63509但同样的语句用在JAVA中调用后输出结果确变成了:
63509.000000000004经过检查,数据库中并未存储过这么长的小数,最多只有两个到小数点后一位的数字.不知是什么原因,请大家帮忙,谢谢.
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货