2 Replies Latest reply on Apr 26, 2012 9:15 AM by ABAZAR

    trigger after insert into tables MASTER  DETAILS ,adding bonus to employees

    ABAZAR
      hi Experts ,,I am beginners in PL/SQL and Triggers
      =========================
      I have Two tables:
      MASTER ( DOC_NO , DOC_DATE , BONUS )
      DETAILS ( EMP_NO , EMP_NAME , EMP_BONUS )

      I need to distribute column(BONUS) in table(MASTER) to column(EMP_BONUS) in DETAILS

      by equally.

      I need it into (trigger after insert)


      EMP_BONUS:=BONUS /count(EMP_NO);

      example:
      BONUS = 100
      no of EMP_NO= 20

      that means (EMP_BONUS=100/20=5),,


      I use Form 6.0 with DB 9i
      plz help