求高手指点迷津,小弟调试好久了

zhouli711094 2013-12-27 05:32:47
存储过程如下:
create or replace function f_gsm_di_handlefailuser
(
i_in_taskid in t_push_failedgroupmember.smsid%type,
i_in_groupid in t_push_failedgroupmember.groupid%type
)
return integer
as
i_l_subgroupid integer;
i_l_subgroupphonenum number;
str_l_subgroupphonenum t_push_config.configvalue%type;
i_l_count integer;
i_l_executecount integer;
begin
i_l_subgroupphonenum := 0;

str_l_subgroupphonenum := f_conf_qr_getconfigvalue('subgroupphonenum', '200');
i_l_subgroupphonenum := to_number(str_l_subgroupphonenum, '9999999999');

while(1 = 1) loop

select count(1)
into i_l_count
from t_push_failedgroupmember t
where t.smsid = i_in_taskid
and t.subgroupid = -1
and rownum <= 1;

if(i_l_count > 0) then

select s_sendfailednum.nextval
into i_l_subgroupid
from dual;

update t_push_failedgroupmember s
set s.subgroupid = i_l_subgroupid
where s.smsid = i_in_taskid
and s.subgroupid = -1
and rownum <= i_l_subgroupphonenum;

i_l_executecount := sql%rowcount;

insert into t_push_sendsms_failedsubgroup
( smsid, subgroupid, groupid, status, writetime, membercount
)
values( i_in_taskid, i_l_subgroupid, i_in_groupid, 1, sysdate, i_l_executecount
);

if(i_l_executecount < i_l_subgroupphonenum) then
commit;
exit;
end if;

commit;
else
exit;
end if;

end loop;

return 1;

exception
when others then
rollback;
return 0;
end f_gsm_di_handlefailuser;

手动debug没有问题。
tomcat跑起来的时候,java代码调该存储过程的时候,报错如下:
java.sql.SQLException: ORA-06550: 第 1 行, 第 17 列:
PLS-00103: Encountered the symbol "(" when expecting one of the following:

* & = - + ; < / > at in is mod remainder not rem
<an exponent (**)> <> or != or ~= >= <= <> and or like like2
like4 likec between || multiset member submultiset
The symbol "*" was substituted for "(" to continue.

求各位大侠指教
...全文
86 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

3,499

社区成员

发帖
与我相关
我的任务
社区描述
Oracle 高级技术相关讨论专区
社区管理员
  • 高级技术社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧