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: New to Triggers, need a Delete Trig

Re: New to Triggers, need a Delete Trig

From: Van Messner <vmessner_at_bestweb.net>
Date: Sat, 10 Feb 2001 15:35:36 GMT
Message-ID: <cddh6.12$7d.2512@newshog.newsread.com>

    I don't know whether anyone here will write the trigger for you. You are correct that you can use an on delete trigger to do whatever you wish with the old data - including storing it in a history table for reference or future use. The Oracle technical site gives you access to all Oracle documentation (you need to register as a developer first, which is free). There is good information on triggers at that site.

    There are also a lot of books on Oracle. Take a look at some of the ones from Oracle Press and O'Reilly to start. If you continue to work with Oracle there will be many, many more questions that will come up.

    By the way - from what you describe - the addition of an IS_SHIPPED (values yes or no) column to your table might be a quick fix. In your select to populate the web site you could just present the rows WHERE IS_SHIPPED = 'NO'; <pk1023_at_my-deja.com> wrote in message news:962ctu$8fe$1_at_nnrp1.deja.com...
>
>
> Hello All,
>
> I am very new to the Oracle enivorment, but I need to create a trigger
> I think.
>
> I have a table of workorders for my plant, the information about the
> build of the job is placed into the records as the job progresses
> through the plant. Then at the time of ship the records are deleted and
> made into a flat text file for a mainframe.
>
> Now lots of people are saying that I am loosing that flat file, so I
> need a record of the workorders, but I don't want them hanging around
> in my main table, because there is alot of data assoicated that I will
> not need further and people would get confused on the web pages.
>
> What I need is this...
>
> On delete from workorders
>
> Copy
> workorders.id, .job_order, .line, .line_set_number, .date_requried, .ESC
> _serial, .version, .date_of_test values ('xg######', etc...) to
> workorders_audit
>
> I would like it to fire everytime there is a delete, this way I know
> everything is done,because only shipping can delete workorder records.
>
> Could somebody help me turn this into a trigger for the workorders
> table? Thank you so much.
>
>
> Sent via Deja.com
> http://www.deja.com/
Received on Sat Feb 10 2001 - 09:35:36 CST

Original text of this message

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