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 -> New to Triggers - Help Please -

New to Triggers - Help Please -

From: Mike M. <okana_at_msn.com>
Date: Fri, 27 Aug 1999 08:57:27 -0700
Message-ID: <G9Bx3.1487$Kuf.6225975@IRIS>


I am just starting to write my own triggers and I have a big project ahead of me that may involve several of them - I already have several that evaluate and assign values upon inserts - those were a piece of cake - but now I'm dealing with data validation.

Here is the first one - and I'm not sure where the error is, actually I'm not even sure I'm doing it right.

I was using the GUI to try and design it, but a SQL statement will work fine if I someone wants to assist me -

Oracle 8.05 on NT4

Table: Customers
Column: OUTCOME

Before update on row: if old.outcome = 14500 and new.outcome in (11000, 12000, 11001) then new.outcome = 14500

In other words, if the new outcome code is 11000, 12000 or 11001 then don't change it. And I don't need an error raised to the user.

Some assistance would be greatly appreciated -

Mike
mikem_at_msamail.com
okana_at_msn.com Received on Fri Aug 27 1999 - 10:57:27 CDT

Original text of this message

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