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: Before insert trigger, weird problem

Re: Before insert trigger, weird problem

From: ALEX J JENTILUCCI <ALEXJENT_at_prodigy.net>
Date: Wed, 22 Apr 1998 17:22:31 -0500
Message-ID: <6hlr3e$gco$1@newssvr04-int.news.prodigy.com>


Igor,

    Do not use the colon in front of new. Oracle thinks it's trying to use a bind variable.

Just use :

    begin

        new.COLUMNNAME := SOME_VALUE_HERE;     end;

Igor Sereda wrote in message <353E32F9.ABC3B4BE_at_spb.runnet.ru>...
>Hello,
>
>There's a strange problems when attempting to assign values to a
>newly inserted row's columns on Oracle 7.3.2 under Solaris 2.5.1 x86.
>
>Let's say the trigger is written the following way:
>
>create trigger triggername
> before insert on tablename
> for each row
>begin
> :new.COLUMNNAME := SOME_VALUE_HERE;
>end;
>
>This trigger would not compile with errors that say something about
>'bad bind variable new'.
>
Received on Wed Apr 22 1998 - 17:22:31 CDT

Original text of this message

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