Why can't a variable have the same name as a table ...

From: <thalabi_at_my-deja.com>
Date: Thu, 19 Aug 1999 16:36:33 GMT
Message-ID: <7phbqg$3rq$1_at_nnrp1.deja.com>


When I create the following procedure;

[Quoted] create or replace procedure customer_add (

    customer customer.name%type)
insert into customer values (customer_add.customer); end;

I get the error;
PLS-00356: 'CUSTOMER' must name a table to which the user has


The message is kind of bogus because I DO have access to the table customer and if I change the variable name from customer to cust the procedure compiles ok. I think the problem is having a local variable the same as a table name.

What is the work around? I must have the paramter named customer and not something else.


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't. Received on Thu Aug 19 1999 - 18:36:33 CEST

Original text of this message