Reputation: 13
i am trying to compile this function
CREATE OR REPLACE FUNCTION sql_error_msg (err_num PLS_INTEGER)
RETURN VARCHAR2 IS
BEGIN
RETURN sqlerrm(-err_num);
EXCEPTION
WHEN OTHERS THEN
RETURN NULL;
END sql_error_msg
/
but i am getting this error:
FUNCTION SQL_ERROR_MSG
On line: 8
PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following:
;
The symbol ";" was substituted for "end-of-file" to continue.
Upvotes: 1
Views: 7432
Reputation: 4717
I was trying to execute PL/SQL that "creates or replaces" a function, using <jdbc:initialize-database>
tag. I was given the PLS-00103 and it turned out PL/SQL is not currently supported this way.
You have to execute the script in a different way.
I am going to try directly with JDBC as per http://www.coderanch.com/t/298532/JDBC/databases/run-SQL-Script-file-JDBC and work out a solutiom from there.
Upvotes: 0