The show errors
SQL*Plus command defaults to reporting errors for the last PL/SQL object created. To show errors for a view you have to specify it:
SQL> create or replace force view someview as select * from nosuchtable;
Warning: View created with compilation errors.
SQL> show errors
No errors.
SQL> show errors view someview
Errors for VIEW SOMEVIEW:
LINE/COL ERROR
---------- --------------------------------------------------------------------
0/0 ORA-00942: table or view does not exist
0/0 ORA-54039: table must have at least one column that is not invisible
Or you can just query user_errors
:
SQL> select line, text from user_errors where name = 'SOMEVIEW' order by sequence;
LINE TEXT
---- --------------------------------------------------------------------------------
0 ORA-54039: table must have at least one column that is not invisible
0 ORA-00942: table or view does not exist
If you really named it something like "view_name"
(in double quotes) then you need to refer to it exactly the same way, including case and quotes.
show errors view "someview"
select line, text from user_errors where name = 'someview' order by sequence;
Or, try creating the view without the force
option:
SQL> create or replace view someview as select * from nosuchtable;
create or replace view someview as select * from nosuchtable
*
ERROR at line 1:
ORA-00942: table or view does not exist
Or, test the query on its own without the create view
part:
SQL> select * from nosuchtable;
select * from nosuchtable
*
ERROR at line 1:
ORA-00942: table or view does not exist