oracle保存小数点前为"0"的问题

1、 统计代码

SELECT FUN_GET_JZ_BUSI_DESC(PROJ_CODE)业务,入库批次,地市,可用数据,呼通量,成功量,呼通率,成功率,渗透率 FROM (      
SELECT A.PROJ_CODE,PICK_TIME 入库批次,AREA 地市,COUNT(DISTINCT A.TEL) 可用数据,
COUNT (CASE WHEN SELLRESULT IN(SELECT SR_ID FROM TB_SELLRESULT@ORCL_JZ WHERE SR_TYPE=1 AND SR_DEPT=1) THEN B.TEL END)呼通量,
COUNT(DISTINCT(CASE WHEN SELLRESULT=1 THEN B.TEL END ))成功量 , 
TRUNC((DECODE(COUNT(DISTINCT(CASE WHEN SELLRESULT IN(SELECT SR_ID FROM TB_SELLRESULT@ORCL_JZ WHERE SR_TYPE=1 AND SR_DEPT=1) THEN B.TEL END)),0,99999999, COUNT (DISTINCT(CASE WHEN SELLRESULT IN(SELECT SR_ID FROM TB_SELLRESULT@ORCL_JZ WHERE SR_TYPE=1 AND SR_DEPT=1) THEN B.TEL END))) )/COUNT(DISTINCT A.TEL)*100,2)||'%' 呼通率,
TRUNC(COUNT (DISTINCT(CASE WHEN SELLRESULT=1 THEN B.TEL END ))/(DECODE(COUNT (DISTINCT(CASE WHEN SELLRESULT IN(SELECT SR_ID FROM TB_SELLRESULT@ORCL_JZ WHERE SR_TYPE=1 AND SR_DEPT=1) THEN B.TEL END)),0,99999999, COUNT (DISTINCT(CASE WHEN SELLRESULT IN(SELECT SR_ID FROM TB_SELLRESULT@ORCL_JZ WHERE SR_TYPE=1 A

你可能感兴趣的:(oracle)