Unanswered: Oracle (1):PL/SQL: ORA-00942: table or view does not exist
i'm trying to compile a Stored Proc like this:
cursor c_Stellplatz_Artikel is
select gang from lvs.invk order by gang;
insert into kh_test values ('something');
WHEN others THEN
raise_application_error( -20001, 'Fehler in Prozedur sp_ps_kh_test' );
The error message ORA-00942: table or view does not exist
means that the lvs.invk table in the cursor declaration is not known, although the (different) schema name is heading the table name. Even creating a public synonym won't help.
Can you test the following for us (from SQL*Plus) ?
SQL>set role none;
SQL>select gang from lvs.invk order by gang;
If the select still works, than I cannot help you more. If the select does no longer work (insufficient privileges), than you have been granted the priviliges to table lvs.invk through a role. To reference this object in a stored procedure, you need "direct" privilege to that particular object.