当前位置: 代码迷 >> Oracle开发 >> oracel存储过程,这是什么有关问题
  详细解决方案

oracel存储过程,这是什么有关问题

热度:223   发布时间:2016-04-24 06:23:31.0
oracel存储过程,这是什么问题
PACKAGE BODY TRANS_HOLLYCRMAPP.PKG_TEST 编译错误

错误:PLS-00103: 出现符号 "NULL"在需要下列之一时:
错误:PLS-00103: 出现符号 "NULL"在需要下列之一时:       
 * & = - + ; <
          / > at in is mod remainder not rem <an exponent (**)>
          <> or != or ~= >= <= <> and or like like2 like4 likec between
          using || multiset member submultiset
行:5
文本:open cur_ref for 'select p.anslogin 工号,p.employess_name 姓名,p.agentcalls 呼入量,p.acdcalls_in15s 在15内的接通量,round(case p.agentcalls when 0 then 0 else p.acdcalls_in15s*100/p.agentcalls end,2) 服务等级,p.gas_repair 抢修,p.complain 投诉,p.acdtime 通话时长,round(case p.acdcalls when 0 then 0 else p.acdtime/p.acdcalls end,0) 平均通话时长 from (select t.anslogin,re.employess_name,sum(case when t.anslogin<>'null' and t.origlogin='null' and length(rtrim(t.calling_pty))>=8 then 1 else 0 end) agentcalls,sum(case when t.anslogin<>'null' and t.origlogin='null' and length(rtrim(t.calling_pty))>=8 and t.disposition=2 then 1 else 0 end) acdcalls,sum(case when t.anslogin<>'null' and t.origlogin='null' and length(rtrim(t.calling_pty))>=8 and t.ringtime<=15 and t.disposition=2 then 1 else 0 end) acdcalls_in15s,sum(case when t.anslogin<>'null' and t.origlogin='null' and length(rtrim(t.calling_pty))>=8 then t.talktime else 0 end) acdtime,sum(case when t.anslogin<>'null' and t.origlogin='null' and length(rtrim(t.calling_pty))>=8 and t.disposition=2 and (t.dispvdn=4206 or t.dispvdn=4207) then 1 else 0 end) gas_repair,sum(case when t.anslogin<>'null' and t.origlogin='null' and length(rtrim(t.calling_pty))>=8 and t.disposition=2 and (t.dispvdn=4218 or t.dispvdn=4219) then 1 else 0 end) complain from call_rec t left join rd_employess re on t.anslogin=re.employess_number where  row_date=to_date('2015-10-22','yyyy-mm-dd') group by t.anslogin,re.employess_name) p order by p.anslogin';

------解决思路----------------------
引用:
Quote: 引用:

不涉密的话,把完整的代码贴一下,表结构也贴上来。

解决了,所有单引号都改成两个单引号,包括 row_date=to_date(''2015-10-22'',''yyyy-mm-dd'')。能不能说说具体是什么原因


好的。