Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How can you create a simple insert or update trigger

10200Apr 29 2003
I am trying to create a simple insert or update trigger to timestamp an xml document when I load it into my XML DB repository but I always get an error trying to compile the trigger.

"ORA-25003: cannot change NEW values for this column type in trigger"

Here is my PL/SQL:

CREATE OR REPLACE TRIGGER "PLCSYSADM"."PLCSYSLOG_TIMESTAMP"
BEFORE
INSERT
OR UPDATE ON "PLCSYSADM"."PLCSYSLOG"
FOR EACH ROW BEGIN

:new.sys_nc_rowinfo$ := xmltype('<datestamp>' || SYSDATE || '</datestamp>');

END;

Does anyone have an example that works ?

Thanks in advance

Niels Montanana
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 27 2003
Added on Apr 29 2003
0 comments
240 views