OBIEE编辑报表比率向下取整问题

    编辑报表的发现一个问题,两个数字相除得到的结果却总是向下取整的,抓出sql发现原因就出在int类型相除向下取整,double类型就没有问题。

抓出sql如下:

select D1.c1 as c1, D1.c2 as c2, D1.c3 as c3from ( select distinct 0 as c1,

    D1.c1 as c2,

     floor(15 * 100 / 16) as c3

from

    SAWITH0 D1

order by c2 ) D1 where rownum <= 10000001

解决方法:

(1):编辑器中的15/16 更改为15.0/16.0

(2):编辑器中的15/16 更改为15.0d/16.0d

你可能感兴趣的:(OBIEE)