Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Problems with trigger creation
The error message says it all. How can you have a single value for
:new.dstamp on a table level trigger? There could be multiple values. You
want an each row trigger. What I don't understand is your logic in the
trigger. You are adding 0 to a date. That is the same as x=y+0 y=x Why
do that at all, you are not changing the value of y. Just burning up more
CPU.
Jim
-- Replace part of the email address: kennedy-down_with_spammers_at_attbi.com with family. Remove the negative part, keep the minus sign. You can figure it out. "Stan Brown" <stanb_at_panix.com> wrote in message news:b9qvnf$fc3$2_at_reader1.panix.com...Received on Tue May 13 2003 - 10:11:06 CDT
> I'm tring to add a new atble, and it's associated indexs, and trigger to
an
> existing instance. The trigger creation is failing with the following
error
> message:
>
> create or replace trigger TEST_TRIG
> *
> ERROR at line 1: ORA-04082: NEW or OLD references not allowed in table
level triggers
>
>
> Here is the syntax I'm using:
>
> create or replace trigger TEST_TRIG
> before insert on SUBVOLTS
> declare
> l_date date;
> begin
> l_date := :new.dstamp+0;
> :new.dstamp := l_date;
> end;
> /
>
> Can some kind soul point out what I'm doing wrong?
>
>
> --
> "They that would give up essential liberty for temporary safety deserve
> neither liberty nor safety."
> -- Benjamin Franklin
![]() |
![]() |