这是由于在动态语句中
采用块语句的方式导致的。
create or replace procedure solution_781_zhou( error_type varchar2 ) is
type ref_cur_type is ref cursor;
error_result_cur ref_cur_type;
an_serv number(30);
partition_id number(4);
v_exe varchar2(4000);
type tab_type is table of interface_error_result_obj;
temp_tab tab_type;
oper_id number(30);
area number(4);
ora_bug exception;
pragma exception_init(ora_bug, -4068);
/*针对3104的误单,一个销售品实例里缺少了一条用户的明细记录。
create table tmp_offer_detail_zhou as select * from ls65_sid.offer_detail_instance_t a where rownum = 1;
drop table tmp_offer_detail_zhou;
*/
begin
if error_type != '30000781' then
raise_application_error(-20001, '该字符串不是 30003104 ');
end if;
v_exe := 'truncate table amdocs.tmp_offer_detail_zhou';
execute immediate v_exe;
amdocs.interface_error_rest('30000781');
open error_result_cur for
select interface_error_result_obj(a.msg_id, a.msg_result) from amdocs.interface_error_result a;
fetch error_result_cur bulk collect into temp_tab;
close error_result_cur;
for i in 1 .. temp_tab.count loop
oper_id := temp_tab(i).msg_id;
get_str(temp_tab(i).msg_result, 'serv_id= ', '套餐商品实例为', an_serv);
area := substr(oper_id, 5, 4);
get_part_zhou(area, partition_id);
dbms_output.put_line(oper_id ||' '|| an_serv || ' '|| partition_id);
v_exe := 'declare begin solution_781_tmp(:oper_tmp, :serv_tmp, :part_tmp); end;';
execute immediate v_exe using oper_id, an_serv, partition_id;
end loop;
dbms_transaction.commit;
end solution_781_zhou;
这里的动态语句中的end少了‘ ; ’就导致报这个错误。