Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Why procedure cannot see table?

Re: Why procedure cannot see table?

From: Rich Woods <rawoods_at_concentric.net>
Date: 1996/12/29
Message-ID: <32C7290D.3C46@concentric.net>#1/1

Z. Martinez wrote:
>
> I created a stored procedure, LOAD_TOP_CUST, but I'm getting this
> error when I call it.
>
> ERROR at line 1:
> ORA-00942: table or view does not exist
> ORA-06512: at "MYUSER.LOAD_TOP_CUST", line 3
> ORA-06512: at "MYUSER.LOAD_TOP_CUST", line 8
> ORA-06512: at line 2
>
> The procedure looks like this
>
> CREATE OR REPLACE
> PROCEDURE load_top_cust IS
> CURSOR top_cust_cur IS
> SELECT
> customer_id
> FROM customer_sales;
>
> top_cust_rec top_cust_cur%ROWTYPE;
>
> BEGIN /*load_top_cust*/
> OPEN top_cust_cur;
> LOOP
> . . .
> CLOSE top_cust_cur;
>
> END load_top_cust;
>
> One notable thing I'd like to mention is that the CUSTOMER_SALES table
> was created by a different user, i.e. OTHERUSER. I tried declaring it
> as OTHERUSER.customer_sales but then I cannot even compile the
> procedure.
>
> I granted select, made a public synonym, but nothing seems to work.
>
> Any information is very much appreciated.
>
> Thanks in advance.

Try adding a Declare statement between the 'PROCEDURE load_top_cust IS' and 'CURSOR top_cust_cur IS' lines.

-- 
Rich Woods
Technical Field Support Specialist, Oracle Corporation, USA
The above statements and opinions are my own and do not
necessarily represent those of Oracle Corporation.
Received on Sun Dec 29 1996 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US