Advertisement
Guest User

Untitled

a guest
Apr 26th, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. CREATE OR REPLACE TRIGGER Trigger_TauxPart
  2. AFTER INSERT OR UPDATE OF Taux_participe ON PARTICIPE
  3. FOR EACH ROW
  4. DECLARE
  5. sumTaux NUMBER;
  6. BEGIN
  7. SELECT COUNT(*) INTO sumTaux
  8. FROM (SELECT Pers FROM PARTICIPE
  9. GROUP BY Pers HAVING SUM(Taux_participe) > 100);
  10. IF (sumTaux > 0)
  11. THEN
  12. BEGIN RAISE_APPLICATION_ERROR(-20011, 'Taux de participation incorrecte');
  13. END;
  14. END IF;
  15. END;
  16. /
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement