Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Procedure won't compile

1008935May 14 2013 — edited May 16 2013
I'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;
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 13 2013
Added on May 14 2013
27 comments
3,374 views