Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Mutation on an after update row trigger :? - a work around would be helpful :
"CME" <support_at_cmesys.demon.co.uk> wrote in message
news:996770948.8474.0.nnrp-01.c2de4217_at_news.demon.co.uk...
> Dear all,
>
>
> I have a trigger that basically updates one field within the record with
the
> current date, so we are able to see when the row was last updated. This
code
> has worked fine in VB against a Sybase database.
>
>
> Now however I am getting a mutation. I have read around the subject and it
> states that I am trying to do two updates on the row :)...which is
correct.
>
>
>
> Bascially I want the LastUpdated field to be updated whenever that row is
> updated.
>
>
> Any help would be gratefully received.
>
>
> Thanks
>
>
> Matt.
>
>
I have the distinct feeling you are issuing an update statement.
You don't need to do that.
Just a simple :new.lastupdated := sysdate
or
select sysdate
into :new.lastupdated
from dual;
is fully sufficient.
Oracle is *NOT* Sybase, it is *MUCH MORE*
That said you can't use Oracle without reading manuals, the Oracle
Applications Developers Manual in this case.
Please try to do so, starting on page 1, and don't forget to read the Oracle
Concepts Manual.
Hth,
Sybrand Bakker, Senior Oracle DBA Received on Thu Aug 02 2001 - 13:26:05 CDT