Home » SQL & PL/SQL » SQL & PL/SQL » Access to other user's object from procedure
Access to other user's object from procedure [message #20458] Sat, 25 May 2002 11:06 Go to next message
Valery
Messages: 3
Registered: May 2002
Junior Member
I have a problem creating procedure refering other user's table:
Suppose I am 'user1' and I try to create procedure performing:
select count(*) from user2.table_X
into v_count;
I get a parser's error message, that object user2.table_X is NOT defind. However, I can get results running this SQL statement from SQL*PLUS command line as user1.
Can anybody help? Thanks in advance.
Valery
Re: Access to other user's object from procedure [message #20460 is a reply to message #20458] Sat, 25 May 2002 12:58 Go to previous message
Su
Messages: 154
Registered: April 2002
Senior Member
Check the permissions and change it to table_X@user2 in your procedure, just like:

select count(*) from table_X@user2
into v_count;
Try it out.
Good luck :)
Previous Topic: SQL coding question
Next Topic: column
Goto Forum:
  


Current Time: Thu Apr 25 07:16:06 CDT 2024