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 -> Re: Saving a pre-changed record

Re: Saving a pre-changed record

From: Connor McDonald <connor_mcdonald_at_yahoo.com>
Date: Sat, 18 Dec 1999 19:59:32 +0800
Message-ID: <385B7724.2B46@yahoo.com>


Paul Bennett wrote:
>
> What if he used only one table but added a parent column. This parent
> column would contain the old order number. This would allow for a change of
> a changed order.
>
> Are there issues with an insert or update trigger updating or inserting into
> the same table?
>
> -- Paul
>
> kal121_at_yahoo.com wrote:
>
> > A trigger that updates another table might work well in this situation.
> >
> > In article <83e4os$845$1_at_nnrp1.deja.com>,
> > steveeq1_at_earthlink.net wrote:
> > > I have a philosophical database question for you guys. I am writing a
> > > simple order system for a company and sometimes, for whatever reason,
> > a
> > > particular order needs to be changed. ie: item A isn't available, so
> > we
> > > give item B to the customer instead, or we change the price of a
> > > particular item, or we lower the shipping costs, etc.
> > >
> > > Anyway, the people who handle the orders sometimes need to reference
> > the
> > > OLD order. Unfortunately, this means I can't simply change the records
> > > blindly, because I need to save the old records somehow.
> > >
> > > Is the best way to handle this is to attach a piece of code before a
> > > particular record is changed to copy the pre-changed record to a
> > > different table with the same layout as the order table? That way, all
> > > the old records are kept into a table somewhere so nothing gets lost.
> > >
> > > I would imagine that is the best way to do it, but I may be missing
> > > something. Do you think the code should exist at the database level or
> > > the Visual Basic level?
> > >
> > > Any ideas or opinions would be great. I don't want to write a lot of
> > > code and then realize it could have been done a better way.
> > >
> > > - Steve
> > >
> > > --------------------------------------
> > > If you want to send me an email, send it to:
> > > steve{at_sign}tripperjones{dot_com}
> > >
> > > Sent via Deja.com http://www.deja.com/
> > > Before you buy.
> > >
> >
> > Sent via Deja.com http://www.deja.com/
> > Before you buy.

You get mutating table issues but these are relatively easy to resolve with some PL/SQL...

--



Connor McDonald
"These views mine, no-one elses etc etc" connor_mcdonald_at_yahoo.com

"Some days you're the pigeon, and some days you're the statue." Received on Sat Dec 18 1999 - 05:59:32 CST

Original text of this message

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