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: Basic trigger question

Re: Basic trigger question

From: Michel Cadot <micadot_at_netcourrier.com>
Date: Thu, 27 Sep 2001 17:11:33 +0200
Message-ID: <9ovfj6$6gk$1@s1.read.news.oleane.net>

"J.Patrick" <pat_at_mindwrap.com> a écrit dans le message news: 73e908ac.0109270632.41131161_at_posting.google.com...
> Can you have a trigger that performs a function on the same table that
> initiates the trigger. For example a trigger created like this:
>
>
> create or replace trigger [trigger name]
> after insert or update on table_abc
> for each row
> begin
> update table_abc set odcomments = concat(column1, column2, column3);
> end;
>
>
> If not... does anyone have any suggestions to do what seems like a simple action?
>
> Thanks very much.
>
>
> Pat

You can use:
:new.odcomments = concat(:new.column1, :new.column2, :new.column3); to update the field of the current row.

If you have to update fields of other rows in the table have a look at Thomas Kyte site, url:
http://osi.oracle.com/~tkyte/Mutate/index.html

--
Have a nice day
Michel
Received on Thu Sep 27 2001 - 10:11:33 CDT

Original text of this message

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