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

Home -> Community -> Mailing Lists -> Oracle-L -> Fwd: updating problems

Fwd: updating problems

From: Simone Saravalli <s.saravalli_at_gmail.com>
Date: Fri, 5 May 2006 14:42:23 +0200
Message-ID: <33ee34370605050542o285bc48coc435c0c023d2fe8c@mail.gmail.com>

2006/5/5, Ghassan Salem <salem.ghassan_at_gmail.com>:
> Simone,
> Can you post the code of your trigger?

Yes, this is an example of the table I want to update:

create table tab (

   a number not null,
   b date default current_timestamp
);

and then the trigger

create or replace trigger my_trig

   after update of a on tab for each row    begin

      update tab set b = current_timestamp where a=:new.a;    end;
/

Now I've written:

create or replace trigger my_trig

   after update of a on tab for each row    begin

      update tab set :new.b = current_timestamp where a = :new.a;    end;
/

but the trigger gets some compilation errors. Is it correct?

Thanks, Simone Saravalli

--
http://www.freelists.org/webpage/oracle-l
Received on Fri May 05 2006 - 07:42:23 CDT

Original text of this message

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