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 -> Triggers to intercept/undo harmful updates

Triggers to intercept/undo harmful updates

From: Stephen Clarke <sclarke_at_harris.com>
Date: 1996/12/19
Message-ID: <32B94EC6.5200@harris.com>#1/1

Hello,

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?

Stephen Clarke Received on Thu Dec 19 1996 - 00:00:00 CST

Original text of this message

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