Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Trigger for INSERT

Trigger for INSERT

From: <lanzinge_at_in.tum.de>
Date: Mon, 05 Jul 1999 10:40:12 GMT
Message-ID: <7lq22b$gum$1@nnrp1.deja.com>


Hello *,

I have a table my_tab with the following structure:   CREATE TABLE my_tab (
    adr INTEGER CONSTRAINT pk PRIMARY KEY,

    a INTEGER,
    b INTEGER,
    c INTEGER,

    sales INTEGER);
Now the 'adr' column is a value that may be calculated from the columns 'a','b','c'. Is it possible to set up an BEFORE INSERT TRIGGER to calculate that 'adr'? I tried to do so, but as the trigger body has to execute an INSERT statement on 'my_tab' there always is a recursion :-(

Any suggestions?

Thanks
  J.Lanzinger

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't. Received on Mon Jul 05 1999 - 05:40:12 CDT

Original text of this message

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