Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Procedure for Triggers

Procedure for Triggers

From: Luch <optimaljedi_at_nospam.net>
Date: Sat, 06 Oct 2001 17:30:49 GMT
Message-ID: <ddHv7.7757$2p1.775996@newsread2.prod.itd.earthlink.net>


I'm new to using PLSQL, triggers

I'd like advice on what the 'standard' way of using triggers is in the following situation. We have an exchange table which is automatically populated by a customer. We want to have a trigger on that table that for every record inserted by them we insert or update the necessary data to our correspending table (both tables in same database). I'd like to hear from someone experienced in doing something similar what is the best way to handle some things:

  1. If the data can't be put into ours because it fails our bussiness rules check, how do we indicate this to the customer? Should we write the details of the error to a log file that they should periodically check? (keep in mind this should optimally be an automatic process that requires no user interaction). Or should we mark a field on the exchange table to indicate that that record failed, and have them check the exchange table periodically?
  2. Is it a good idea to delete the record from the exchange table after it is successfully processed or leave it there permanently. (my original idea was to delete it until I ran into 'mutating table' errors.)

If there's any other advice I'd appreciate it. Learning the syntax rules for PLSQL isn't hard (plenty of websites out there to teach that), but we're new to the actual concepts of how it should be used.

--
Luch
replace nospam with usa for e-mail.
Received on Sat Oct 06 2001 - 12:30:49 CDT

Original text of this message

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