Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> What happens after an error in an PL/SQL proc?
I have a return parm in an Oracle 8.0 stored procedure that indicates whether any errors occurred in the proc. I have (very) simple exception handler that returns a 1 in the return parm if the proc errors and then terminates execution. I had no compilation errors but I wanted to make sure that the following code will have the desired effect. If an error occurs, will Oracle terminate execution of the proc or will it return to the FOR...LOOP and continue processing?
Thanks much!
BEGIN SUCCESS := 2; FOR rs IN loans loop
SELECT SUM(A.AMOUNT) INTO tmpBalance FROM ALODETAIL A WHERE LOAN=rs.LOAN;
UPDATE ALOLOAN SET AMOUNT_6=(tmpBalance) WHERE LOAN=rs.LOAN;
COMMIT;
END LOOP;
EXCEPTION
WHEN OTHERS THEN
SUCCESS := -1;
END;
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Wed Nov 15 2000 - 14:06:14 CST