Procedure won't compile
1008935May 14 2013 — edited May 16 2013I'm trying to create a stored procedure using a table in another schema (name of schema is "GLOBAL") and I keep getting the following compile errors. The example is really simple (see below), and I know for a fact the user account has privileges on the table. I can run a SELECT query against the table without any trouble. The problem ONLY occurs when I attempt to create the procedure. This has been very frustrating. Any ideas? DB is 11gR2.
*==== COMPILE ERRORS =======================*
Error(8,3): PL/SQL: SQL Statement ignored
Error(8,24): PL/SQL: ORA-00942: table or view does not exist
*==== SIMPLE EXAMPLE =======================*
create or replace
PROCEDURE BLAH
(
PARAM1 IN NUMBER,
CUR OUT SYS_REFCURSOR
) AS
BEGIN
OPEN CUR FOR
select * from GLOBAL.SETTLEMENT WHERE OBJECTID = PARAM1; -- <== the problem line
END BLAH;