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: <pk1023_at_my-deja.com>
Date: Sun, 11 Feb 2001 18:23:28 GMT
Message-ID: <966lap$bgf$1@nnrp1.deja.com>

 I have checked out the site and consulted a website called SQL for Web Nerds alot, but I am just afraid to write it without help. I don't know what to put in the condition for firing, I mean I know that I want it to fire every time, so do I put ID > 0?

In article <cddh6.12$7d.2512_at_newshog.newsread.com>,   "Van Messner" <vmessner_at_bestweb.net> wrote:
> 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/
>
>

Sent via Deja.com
http://www.deja.com/ Received on Sun Feb 11 2001 - 12:23:28 CST

Original text of this message

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