存储过程大神有木有?
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;
执行的时候未找到任何数据!