Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Triggers to intercept/undo harmful updates
Stephen Clarke wrote:
> I am trying to "intercept" (and negate) harmful updates to a certain
> table. I have a (powerbuilder) front-end that seems to partially ignore
> my "where" clause and do a blanket "set" on a column from value A to
> value B. I would like to "undo" the update through Oracle 7.0.15
> (Server) until a fix can be made to the front-end.
>
> So, I'm thinking about a trigger like this:
>
> CREATE TRIGGER undo
>
> BEFORE UPDATE OF status ON table
> FOR EACH ROW WHEN (old.status = 'C')
> BEGIN
> :new.status := 'C';
> END;
>
> Will this work?
I have tested it. It does not work.
--- Name : Lun Wing San Title : Oracle Application Developer of Hong Kong Productivity Council Oracle Database Administrator and System Administrator of QRC Phone : (852)27885841Received on Fri Dec 20 1996 - 00:00:00 CST