Compile error "ERROR ORA-06550: line 3, column 40:"
rpietka opened this issue · 8 comments
When I compile anything (package, package body, view, table, triger...), I always have this error. Always on the same line, even if there is a comment on a couple of lines.
When i run the file as script (F5) always it success
Success => USER@DATABASE script.sql
=============================== STDOUT ===============================
2
But nothing will be created / modified on the database.
Hey @rpietka , I think there is a problem with your pl/sql block.
If you run as a script you should write "/" at the end and you should get a similar error as with Compile.
Have you tried a super simple sql like "select 1 from dual;"?
Thanks. When I added "/" the file as a script it runs perfectly fine. However, it still doesn't compile. Still the same error as in the topic. Always the same error, the same line. No matter what object is compiling. Even if the first 10 lines are a comment, the error occurs on the 3rd line, always.
There is sth wrong with your code block. Ora compiler sometimes outputs wrong line/error. Try with a simple block and then add gradually your code.
Yes, I know that the Oracle compiler doesn't always give the right line. However, I have tried to compile different files with different contents and the error is always in 3 line. Even for sample code:
CREATE OR REPLACE PACKAGE API_TEST IS FUNCTION test(p_test NUMBER ) RETURN NUMBER; END API_TEST;
in the file "PACK_API_TEST.SQL" an error appears exactly on the same line
2/12 ERROR ORA-06550: line 3, column 40: PL/SQL: ORA-00942: table or view does not exist ORA-06550: line 3, column 5:
If I paste this code into SQL Developer (Ctrl-A, Ctrl-C, Ctrl-V in SQL developer, F5) and run it, it will run without error. And this is the case with every file that I checked.
If I run a simple instruction like select 1 from dual;
as a script, it runs fine. Even if I replace "DUAL" with a real table.
If I compile such a statement. Same error on the same line.
1/19 ERROR ORA-06550: line 3, column 40: PL/SQL: ORA-00942: table or view does not exist ORA-06550: line 3, column 5: PL/SQL: SQL Statement ignored
And there isn't even such a line here.
@rpietka , thanks a lot for reporting. it was indeed a bug that was introduced in the last version. It should be fixed now in version 0.3.26.
Thank you for the information. I am very glad that the problem will be solved. Thank you for developing the extension.
Ups, my fault haha, I checked installed apex version but not if apex was indeed installed before adding apex compatibility.
No problem. It should work now even if the table doesn't exist.