日期:2014-05-17  浏览次数:20654 次

Oracle Report 错误
我在做一个Reprot时,在其中写了一个公式有select into 语句。
当select 误句无查询到记录时,就出现错误,可以用exception去错误处理。
但现在我想让报表在查询到无记录时,就不再执行接下来的动作,给用户提示“无记录”,status不是error,是normal
应如何做?

------解决方案--------------------
将该select into 放入一单独的begin ... end;块

类似如下:

begin

...

begin
select into ...;
exception
when no_data_found then
null;
end;

...

exception
when ... then
...

end;