Re: Can this be done with a trigger?

From: gazzag <>
Date: Tue, 5 Aug 2008 09:43:21 -0700 (PDT)
Message-ID: <>

On 5 Aug, 17:11, wrote:
> Hi,
> We have a table like this:
> We also have a history table like this:
> We want to put a trigger on the first table such that when a record is
> inserted or updated it will make the entry to the history table.
> However, the problem is the 'SOURCE' column on the history table.  It
> is not present or needed in the first table.
> Entries into the first table are done through a PL/SQL program.  So,
> what we want is that when the entry is made into the first table, it
> fires the trigger to make the second entry.  But, how can this be done
> if the columns do not match?
> We do not want to code it in the PL/SQL program because then someone
> can make an entry to the first table and we cannot record the history
> on it, yet the SOURCE column only gets populated in the PL/SQL
> program....
> And, to make things more complicated, depending on what is being
> UPDATED, we may need the values of :NEW or :OLD........
> Is there a way to do this?

Sure there is. What is SOURCE though? Received on Tue Aug 05 2008 - 11:43:21 CDT

Original text of this message