Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Newbie question: autoupdating atributes
"Drazen" <drazen_candy__at_hotpop.com> wrote in message
news:965vitcgg3bds9igoe95lvfdeh26d1kg6s_at_4ax.com...
> Hi,
>
> I have a table that has 3 attributes; att1, att2 and att3.
> When I insert data into table I insert values of att3 and values of
> att1 and att2 are calculated from the value of attribute att3. I was
> reading a chapter on triggers from Oracle manual but I cannot make it
> work, I am stuck with assigning the derived values. Any help would be
> very appreciated.
>
> Thanks,
>
>
>
> Thanks,
>
> Drazen,
>
> =============================================
> Eat the candy to see my address better !!!
>
> Candy spam protection :)
> =============================================
Just create a before insert trigger and have :new.att1 = <some formula with :new.att3 in it>; :new.att2 = <some formula with :new.att3 in it>;
Choosing better column names might also be recommended.
Hth
Sybrand Bakker, Oracle DBA Received on Tue Jun 19 2001 - 14:18:53 CDT