Click to See Complete Forum and Search --> : pl/sql procedure exiting


nw1234
10-19-2000, 06:11 PM
I have a pl/sql procedure for oracle 8.1.6 and I have multiple if..then statements.

I want to be able to leave the procedure (i.e. exit) after a certain condition is met... I do not want to have to write in all the conditions into each if..then statement. Especially since I am working with cursors.. it could get ugly.

If anyone knows how to get out .. please let me know.

Nick

akkerend
10-19-2000, 06:56 PM
It's not possible to use IF THEN ELSIF?

You can use RETURN to leave the procedure:

IF condition1
THEN statement1; return;
END IF;
IF condition2
THEN statement2; return;
END IF;

nw1234
10-19-2000, 06:58 PM
very cool! thanks!