Compilation errors in SQL*Plus stored procedure
create or replace procedure ppp(v1 INTEGER) as DECLARE begin end; /
Then I saved the file and entered / at prompt. Then it gave me this warning: Procedure created with compilation errors. Please help!
DECLARE is not necessary when CREATING a stored procedure. DECLARE is only necessary for anonymous PL/SQL block.
So you should write:
CREATE OR REPLACE PROCEDURE PPP(vi INTEGER) IS BEGIN Null; -- Just to get PPP compiled -- Write your statements here. END;
Secondly, you should try to create your procedures in a file (say ppp.sql) and from SQL*Plus prompt execute the file like this.
Please make sure to include the / slash in your file.
SQLPLUS>@ppp.sql
If you still get errors, make sure to type SHOW ERRORS so you can debug.