Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> PL/SQL Script Check for Syntax Errors Prior to Running
Does any know if there is a way to check a PL/SQL script for compile
errors prior to running the script (FYI - I know I can save them as
PROCEDURES to get this info). Example...it would tell you there is a
semi-colon missing on the END IF.
Reason I'm asking is that I'm writing a few scripts that will update several tables. I'd like to know if I made any stupid mistakes prior to running the script.
BEGIN
IF vv_Action = 'HELLO' THEN
DBMS_OUTPUT.PUT_LINE('Hello');
ELSE
DBMS_OUTPUT.PUT_LINE('Bye');
END IF
EXCEPTION
WHEN OTHERS THEN
DBMS_OUTPUT.PUT_LINE('ERROR');
END;