-
I am trying to compile a procedure in which I have a cursor that selects from a table in a different schema but it is not compiling.
I am logged in as aaa.
Here is the procedure:
CREATE OR REPLACE PROCEDURE test
AS
CURSOR cur_test IS
SELECT * FROM test_table /*test_table is in schema bbb*/;
BEGIN
NULL;
END;
I get the following error message:
PLS-00201: identifier 'BBB.TEST_TABLE must be declared.
I have a public synonym for test_table and I have tried qualifying the table with the owner and I get the same error message. It obviously knows which table I am trying to query but it won't let me compile the procedure.
Any ideas?
-
Did you grant select privileges on the table to user AAA or to a role of user AAA? Roles are disabled in stored procedures.
Grant select on test_table to AAA.
-
Thanks, you were exactly right!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|