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: PLS-00049:bad bind variable

Re: PLS-00049:bad bind variable

From: trub3101 <michael_at_bassline01.wanadoo.co.uk>
Date: 29 May 2007 02:50:01 -0700
Message-ID: <1180432201.883187.279770@o5g2000hsb.googlegroups.com>


On 29 May, 10:28, trub3101 <mich..._at_bassline01.wanadoo.co.uk> wrote:
> I seem to have got myself into a bit of a pickle with this one.
>
> After creating the 'THIS_IS_MY_MAP' table as user THIS_IS_ME I have
> then attempted to create
> and compile the THIS_IS_MY_INS_SEQ trigger to insert a new ID number
> into THIS_IS_MY_MAP.IMG_ID
> before each row is inserted into the THIS_IS_MY_MAP table.
>
> CREATE OR REPLACE TRIGGER THIS_IS_MY_INS_SEQ
> BEFORE INSERT
> ON THIS_IS_MY_MAP
> FOR EACH ROW
> BEGIN
> SELECT THIS_IS_MY_SEQ.NEXTVAL
> INTO :NEW.THIS_IS_MY_MAP.IMG_ID
> FROM DUAL;
> END;
> /
>
> However, when I attempt to compile the trigger I get the following
> error message:
>
> PLS-00049: bad bind variable 'NEW.THIS_IS_MY_MAP'
>
> Removing the colon then gives me this error message:
>
> PLS-00201: identifier 'NEW.THIS_IS_MY_MAP' must be declared
>
> After searching the web I concluded that this is a privilege issue and
> simply granted all on
> THIS_IS_MY_MAP to THIS_IS_ME although I am still puzzled as to why I
> need to do this if I created
> all the objects THIS_IS_MY_MAP, THIS_IS_MY_SEQ and THIS_IS_MY_INS_SEQ.
>
> In any case I am still getting the same error messages!
>
> Thanks in advance,
>
> tb31

Okay.

INTO :NEW.THIS_IS_MY_MAP.IMG_ID
should be INTO :NEW.IMG_ID

Cheers, Received on Tue May 29 2007 - 04:50:01 CDT

Original text of this message

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