【发布时间】:2014-05-12 13:26:19
【问题描述】:
我有 other_procedure 可以做一个
RAISE_APPLICATION_ERROR(-20001,'Some text here');
当发生错误时,我想跳到循环的末尾,我这样做了。但我不知道如何发现这个错误。
请注意,我使用的是 Oracle 10g,所以我无法使用 continue,这就是我使用 GOTO 的原因。
我试过了,但有异常无法编译。
create or replace procedure my_procedure
as
begin
for item
IN some_cursor
LOOP
if(condition) then
other_procedure;
exception when -20001 then
goto end_loop;
--some code here
end if;
<<end_loop>>
null;
END LOOP;
end;
【问题讨论】:
-
好的,因为downvoters,我选择完全重新制作它,现在过程将IN OUT参数传递到嵌套过程中,在我曾经引发错误的地方设置为0或1
标签: sql oracle stored-procedures plsql