当前位置: 代码迷 >> Oracle开发 >> Oracle Report 异常
  详细解决方案

Oracle Report 异常

热度:205   发布时间:2016-04-24 08:02:06.0
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;
  相关解决方案