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 -> Help writing simple trigger.

Help writing simple trigger.

From: <tim.mcconechy_at_runtime.dk>
Date: Fri, 26 Feb 1999 11:14:33 GMT
Message-ID: <7b5vml$t9k$1@nnrp1.dejanews.com>


For some reason I can't figure out how to write a simple trigger but I know it's very common so I'll ask for some help. It's a busy day!

This trigger updates user_name and lastedit_date on a table during and update or insert operation for each row and maybe fill in the pk with a sequence number.... CREATE TRIGGER UPD_TRG BEFORE INSERT OR UPDATE ON dbstruct BEGIN user_name=user lastedit_date=sysdate recno=dbstructseq.nextval END;

When I write my function I get table is mutating error. It should operate in the same transaction as the insert update.

I.E. 1 update staement+trigger = 1 transction...=1 SQL parse..

Thank You very much!!!!

-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Fri Feb 26 1999 - 05:14:33 CST

Original text of this message

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