Neoview Guide to Stored Procedures in Java (R2.3, R2.4)
and “Output Parameter Arguments” (page 65). For more information about result sets, see
“Returning Stored Procedure Result Sets” (page 27).
This example creates a trigger that executes an SPJ named LOWERPRICE when the
QTY_ON_HAND column of the PARTLOC table is updated and exceeds 500 parts:
CREATE TRIGGER sales.setsalesprice
AFTER UPDATE OF qty_on_hand
ON invent.partloc
FOR EACH STATEMENT
REFERENCING NEW as newqty
WHEN ( SUM(newqty.qty_on_hand) > 500 )
CALL sales.lowerprice();
For information about the CREATE TRIGGER syntax, see the Neoview SQL Reference Manual.
Calling an SPJ in a Trigger 71