oracle报错00936 缺失表达式 错误 select t.comcode 组代码,(select y.comcname from cc_company y where y.comcode=t.comcode) 组名称,sum(decode(aa.a3,0,aa.a1,0)) as 零分总量,sum(decode(aa.a3,1,aa.a1,0)) as 一分总量,sum(decode(aa.a3,2
来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/27 14:18:52
oracle报错00936 缺失表达式 错误 select t.comcode 组代码,(select y.comcname from cc_company y where y.comcode=t.comcode) 组名称,sum(decode(aa.a3,0,aa.a1,0)) as 零分总量,sum(decode(aa.a3,1,aa.a1,0)) as 一分总量,sum(decode(aa.a3,2
oracle报错00936 缺失表达式 错误
select t.comcode 组代码,
(select y.comcname from cc_company y where y.comcode=t.comcode) 组名称,
sum(decode(aa.a3,0,aa.a1,0)) as 零分总量,
sum(decode(aa.a3,1,aa.a1,0)) as 一分总量,
sum(decode(aa.a3,2,aa.a1,0)) as 二分总量,
sum(decode(aa.a3,3,aa.a1,0)) as 三分总量,
sum(decode(aa.a3,4,aa.a1,0)) as 四分总量,
sum(decode(aa.a3,5,aa.a1,0)) as 五分总量,
sum(decode(aa.a1,'' ,0,aa.a1)) 满意度评价总量,
sum(decode(aa.a4,'',0,aa.a4)) 满意度评价总分
from
(select distinct c.comcode as comcode from cc_company c where 1=1 and c.flag='2' )t ,
(select count(a.result) a1,c.comcode as comcode ,a.result a3,sum(a.result) a4
from cc_tivr_csr a,cc_user b ,cc_company c
where 1=1
and a.agentid = b.usercode
and b.reserve2=c.comcode
and a.result ='F'
and a.result is not null
and c.flag=2 and c.comtype='' group by ,a.result) aa
where t.comcode=aa.comcode(+)
group by t.comcode order by t.comcode
oracle报错00936 缺失表达式 错误 select t.comcode 组代码,(select y.comcname from cc_company y where y.comcode=t.comcode) 组名称,sum(decode(aa.a3,0,aa.a1,0)) as 零分总量,sum(decode(aa.a3,1,aa.a1,0)) as 一分总量,sum(decode(aa.a3,2
and c.flag=2 and c.comtype='' group by , a.result) aa
group by 后面多了个, 逗号