create or replace procedure P_TEST_XMBH(sReturn out varchar2 ) is


v_xmbh varchar2(200);

cursor cur_ht is
select P.XMBH
from scm_mdm_project p
where p.xm_zl_zt='Y' AND P.M_PRO='1';

begin
sReturn:='0';
open cur_ht;
loop
fetch cur_ht into v_xmbh;
exit when cur_ht%notfound;

insert into xm_test
(XMBH)
select v_xmbh from dual;
commit;
end loop;
close cur_ht;--关闭游标
commit;
sReturn:='100';
exception when others then
rollback;
p_pub_error_log(0,sqlcode,sqlerrm,'P_TEST_XMBH');
sReturn:='-1:数据处理错误!';
end P_TEST_XMBH;

相关文章:

  • 2022-12-23
  • 2021-12-13
  • 2021-12-08
猜你喜欢
  • 2022-01-20
  • 2022-12-23
  • 2021-10-18
  • 2021-12-05
  • 2021-08-08
相关资源
相似解决方案