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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Why can't a variable have the same name as a table ...

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

From: Neil Deaville <neil_at_funkcity.demon.co.uk>
Date: Thu, 19 Aug 1999 19:12:32 +0100
Message-ID: <935086066.5671.0.nnrp-01.9e98151b@news.demon.co.uk>


I wouldn't bother!

Giving a variable the exact same name as a table gets confusing.

Don't worry your head about it :)

Neil

<thalabi_at_my-deja.com> wrote in message news:7phbs2$3sv$1_at_nnrp1.deja.com...
> Hi,
>
> When I create the following procedure;
> ----------------------------------------------------
> create or replace procedure customer_add (
> customer customer.name%type)
> as
> begin
> insert into customer values (customer_add.customer);
> end;
> ----------------------------------------------------
> I get the error;
> PLS-00356: 'CUSTOMER' must name a table to which the user has
> access
>
> 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.
>
> Regards
> TH
>
>
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.
Received on Thu Aug 19 1999 - 13:12:32 CDT

Original text of this message

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