Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Trouble with Triggers
A copy of this was sent to abrusko <abrusko_at_binney-smith.com>
(if that email address didn't require changing)
On Fri, 13 Aug 1999 03:37:44 -0800, you wrote:
>Hi,
>
>I want to create a trigger that will write certain columns
>from a row in table "A" to a separate table whenever a row
>in table "A is deleted. It will act as a log and as a
>means of re-creating that record if needed at a later time.
>
>I assume that this can be accomplished thru a trigger, but
>am having a little trouble in coding it. This is what I
>have so far...can someone please tell me what is wrong and
>how to correct it.
>------------------------
>create or replace trigger copy_before_delete_freight
>before delete on frt.freight
>for each row
>begin
> Insert into frt.freight_deleted
> values(:old.frt_order, :old.bl, :old.accessorial_rc);
>end;
>------------------------
>Thanks very much...Andy
Looks OK to me. Whats the error?
If it is an error during compilation, issue:
SQL> show errors trigger copy_before_delete_freight
to list them out.
>
>
>
>* Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
>The fastest and easiest way to search and participate in Usenet - Free!
--
See http://govt.us.oracle.com/~tkyte/ for my columns 'Digging-in to Oracle8i'...
Current article is "Part I of V, Autonomous Transactions" updated June 21'st
Thomas Kyte tkyte_at_us.oracle.com Oracle Service Industries Reston, VA USA
Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Fri Aug 13 1999 - 07:22:16 CDT
![]() |
![]() |