根據客戶需要
特此存檔
create or replace procedure P_INSERT_XT_TJ_MX(sDate in varchar
sXh xt_tj
sDwmc xt_tj
sDw xt_tj
sDwzd xt_tj
sTable xt_tj
sSjzd xt_tj
sSqlStr varchar
iCount int;
cursor curSort is
select xh
begin
open curSort;
loop
fetch curSort into sXh
exit when curSort%notfound;
sSqlStr :=
Execute Immediate sSqlStr into iCount using sDate
delete from xt_tj_mx where fxh=sXh and sjz=sDate;
insert into xt_tj_mx(xh
commit;
end loop;
end P_INSERT_XT_TJ_MX;
From:http://tw.wingwit.com/Article/program/Oracle/201311/17475.html