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

Home -> Community -> Usenet -> c.d.o.tools -> Re: help me pls

Re: help me pls

From: Ted Knijff <knijff_at_bigfoot.com>
Date: Thu, 08 Mar 2001 18:41:51 GMT
Message-ID: <3aa7d1d2.28244553@news.online.de>

With SQL-Plus do :

CREATE OR REPLACE TRIGGER INS_mytable
  BEFORE INSERT ON mytable
  FOR EACH ROW
BEGIN
 :new.DateCreated :=sysdate;
END; /
On Wed, 07 Mar 2001 17:36:24 GMT, Steve Bell <swayne.bell_at_sympatico.ca> wrote:

>Hi,
>Are you saying you want to insert the date/time when you insert a new
>row? If so, you can do
>that by creating a column in your table called "DateCreated",
>"DateInserted", something like that. You can make sysdate the default
>for that column. When you insert your other values the time will be
>recorded that way.
>I hope this helps,
>S
>
>C.K. wrote:
>
>> i really need some help on this,
>>
>> i'm trying to fire a trigger after/before(this doesn't matter) i insert a
>> record into the database.
>> The problem is that, during the time of running the trigger, i have to add
>> some data to the inserting record; like.. the time of insert, something like
>> that.
>> i know that using a temp table, and run the trigger thru the insert of temp
>> table will be easier, however, due to some restriction, i can't do that, can
>> anybody tell me a better way so that i can edit the data while i'm inserting
>> it to the table?
>> pls help me out!
>>
>>
>>
>

EMail: knijff_at_bigfoot.com Received on Thu Mar 08 2001 - 12:41:51 CST

Original text of this message

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