存储过程大神有木有?

woaini55pk 2013-01-14 03:37:20
create or replace procedure sp_check_to_market(
wf_id_in in number,
form_data_id_in in number,
market_id in varchar2
--return_code out number,
-- return_desc out varchar2
)
is
type c_array is table of varchar2(10) index by binary_integer;
p number default 0;
idx number default 0;
strc varchar2(500);
ca c_array;
market_id2 varchar(500);
begin
strc:=market_id;
loop
p:=instr(strc,'-',1);
exit when p=0;
ca(idx):=substr(strc,1,p-1)||',';
dbms_output.put_line(ca(idx));
idx:=idx+1;

p:=instr(strc,'|',1);
exit when p=0;
strc:=substr(strc,p+1,length(strc));
select status_id into market_id2 from ecl_request_sheet where request_id in(ca(idx));
--if market_id2<>6 then
-- dbms_output.put_line('可以');
-- else dbms_output.put_line('不可以');
-- end if;
end loop;



COMMIT;

EXCEPTION

WHEN OTHERS THEN
ROLLBACK;
RAISE;

END;

begin
sp_check_to_market(101525,60041,'101518-销售合同评审流程 [ HTP-20130114-001 ] |101470-销售合同评审流程 [ HTP-20130109-001 ]');
end;

执行的时候未找到任何数据!
...全文
128 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
yousite1 2013-01-15
  • 打赏
  • 举报
回复
你想要什么结果。
任第一 2013-01-15
  • 打赏
  • 举报
回复
存储过程也可以单步调试啊。点存储过程名字,然后点右键-->test ,你自己试试啊。一步一步调试,然后你就知道那里报错了。

81,092

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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