Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Saving a pre-changed record
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?
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.
Received on Sat Dec 18 1999 - 01:14:41 CST
![]() |
![]() |