ORA-00937: 不是单组分组函数


缺少了分组条件

比如

SELECT teller_code,(select xm from sys_dict_ggczy d where d.czy=a.teller_code ) as teller_name, SUM(TRX_NUM) SUM_TRX_NUM, SUM(OCR_TRX_NUM) SUM_OCR_TRX_NUM, 100*(fun_formatdecstr2(round(to_number(SUM(OCR_TRX_NUM) ,'999999999.000')/ case when SUM(TRX_NUM) = 0 then 1 else SUM(TRX_NUM) end,2))) || '%' sbl FROM rpt_pvoas_statistic a

就报这个错误,然后添加分组条件就好了

group by teller_code

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM