lundi 30 novembre 2015

Wondering why my SQL statement is ignoring my SET symbol

This is my SQL trigger and it is suppose to change the reorder value to Y or N depending if ON_HAND is less than or greater than the MINIMUM. The problem is it's ignoring the set statement completely. Do I have to arrange these differently?

CREATE OR REPLACE TRIGGER TRG_REORDER 
AFTER UPDATE OF ON_HAND, MINIMUM ON PART

BEGIN

IF ON_HAND <= MINIMUM THEN
   SET REORDER = 'Y';
ELSE ON_HAND > MINIMUM
   SET REORDER = 'N';

END IF;
END;

Aucun commentaire:

Enregistrer un commentaire