Re: updating fields without user interaction

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Tue, 28 May 2002 23:09:09 +0200
Message-ID: <uf7sqane4rtbf4_at_corp.supernews.com>


"Philip" <pescott_at_roadrunner.nf.net> wrote in message news:ad0mmi$opa$1_at_horsefly.nf.net...
> Hi:
>
> I'm using jdeveloper with jsps and want to know the best way to update
> fields ie. date -added, created_by, etc whenever a record is added,
deleted
> or modified.
>
> Where is the best place to put this code?
>
> Any advice/samples would be appreciated.
>
> THanks.
>
>
>
>

create or replace trigger track before insert or update on <table> for each row
begin
:new.<date_modified> := sysdate;
-- etc
end;
/

examples can be found in the Oracle Applications Developer Manual. Please try to use it.

Hth

--
Sybrand Bakker
Senior Oracle DBA

to reply remove '-verwijderdit' from my e-mail address
Received on Tue May 28 2002 - 23:09:09 CEST

Original text of this message