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 -> Re: Trigger Code

Re: Trigger Code

From: Mark C. Stock <mcstockX_at_Xenquery>
Date: Sat, 20 Mar 2004 20:59:52 -0500
Message-ID: <PfWdnc-muMypasHdRVn-gQ@comcast.com>

"Redd" <javatek?@usa.com> wrote in message news:Zd67c.94318$JN2.75110_at_bignews4.bellsouth.net...
| I am trying to implement a trigger to update a field and
| these are the columns.
|
|
| Quantity Integer
| OldQuantity Integer
| OnOrder Char
|
|
| Does anyone know how to write the trigger that on update
| if Quantity is equal to or less than OldQuantity write the
| Character "T" to the OnOrder field.
|
|
|
|

use a 'before update ... for each row' trigger with a 'when' condition that compares the oldquantity and new quantity, and assign the value 'T' to onorder

;-{ mcs Received on Sat Mar 20 2004 - 19:59:52 CST

Original text of this message

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