create or replace procedure update_chk_material(sheetids in chk_materialcheck.sheetid%type) is
flag1 chk_materialcheck.auditflag%type;
flag2 chk_materialcheck.auditflag2%type;
cursor yb(sheetids chk_materialcheck.sheetid%type) is select auditflag,auditflag2 from chk_materialcheck where sheetid=sheetids;
begin
open yb(sheetids);
loop
fetch yb into flag1,flag2;
exit when yb%notfound;
if (flag1='Y') and (flag2='Y') then
update chk_materialcheck set passed='Y' where sheetid=sheetids;
end if;
end loop;
close yb;
end update_chk_material;
flag1 chk_materialcheck.auditflag%type;
flag2 chk_materialcheck.auditflag2%type;
cursor yb(sheetids chk_materialcheck.sheetid%type) is select auditflag,auditflag2 from chk_materialcheck where sheetid=sheetids;
begin
open yb(sheetids);
loop
fetch yb into flag1,flag2;
exit when yb%notfound;
if (flag1='Y') and (flag2='Y') then
update chk_materialcheck set passed='Y' where sheetid=sheetids;
end if;
end loop;
close yb;
end update_chk_material;
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货