oracle procedureòì3£′|àí
ORA-01403:no data found ?a??·?·¨á??ò
?a??·?·¨ò?£o?óò???exceptionòì3£′|àí
exception when no_data_found then
....
?a??·?·¨?t£o?ü??selectó???£?è?£o
select count(*) field into var from table where ....
???óò???count(*)?′ê1??óD?òμ?êy?Y£?ò2?á·μ??0£???2?ê?null?£
???ê£o?ú?′DDò???ó???ê±±¨′í?£
declare
v_spec varchar2(255);
begin
for r in (select subne.id, subne.subneassetid from subne where subne.subneassetid >0)
loop
select subnetype.subnemodel into v_spec from subnetype , subne
where subne.id = r.id and subne.subnetypeid = subnetype.id;
update asset set specformula = v_spec where id = r.subneassetid and specformula is null;
end loop;
end;
ORA-01403: ?′?òμ?êy?Y
ORA-06512: ?úline 6
?ó???àá¢μ??é£?
begin
select subnetype.subnemodel into v_spec from subnetype , subne
where subne.id = r.id and subne.subnetypeid = subnetype.id;
update asset set specformula = v_spec where id = r.subneassetid and specformula is null;
exception
when no_data_found then
null;
end;
?a?ù?úno_data_foundê±£??-?·?í2??áì?3?á?£?
相关新闻>>
- 发表评论
-
- 最新评论 更多>>