Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Before insert trigger, weird problem
Hi,
I am terribly sorry, but i think you are wrong. NEW and OLD
are in fact bind variables. And usage of colon is required,
as far as i know.
Try to use your example yourself - you'll see.
Thanks anyway,
Igor
ALEX J JENTILUCCI wrote:
>
> 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'.
> ?
--
Igor Sereda,
ITC, Russia
Received on Thu Apr 23 1998 - 14:36:13 CDT
![]() |
![]() |