Posted By

wh0emPah on 04/02/10


Tagged


Versions (?)

mqiojfei


 / Published in: PL/SQL
 

  1. CREATE OR REPLACE TRIGGER P6_7_TRIGGER2 BEFORE
  2. INSERT OR UPDATE OF ORD_ID ON s_item
  3. FOR EACH ROW
  4. FOR I IN 1..P5_summit_pkg.t_totord.COUNT
  5. IF(summit_pkg.t_totord(i).ord_id = :NEW.ord_id) THEN
  6. IF (P5_summit_pkg.t_totord(I).total >= 10)
  7. THEN RAISE_APPLICATION_ERROR(-20000, 'max 10 items per order!');
  8. END P6_7_TRIGGER2 ;

Report this snippet  

You need to login to post a comment.