Advertisement
ma39isy

Untitled

Jul 17th, 2024
409
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. CREATE OR REPLACE TRIGGER "ACADEMIC"."AFT_UPD_COURSEPOINTCHANGE" AFTER UPDATE ON "ACADEMIC"."COMPLETECOURSEPOINTCHANGE" REFERENCING OLD AS "OLD" NEW AS "NEW" FOR EACH ROW WHEN (
  2. NEW.APPROVALSTATUS='Y'
  3.       )
  4. BEGIN
  5.   UPDATE COMPLETECOURSEPOINT SET INDEXPOINT=:OLD.INDEXPOINT, UPDATEBY=:OLD.UPDATEBY, UPDATETIME=SYSDATE, COUNCILDATE=:OLD.COUNCILDATE, ACTIVESTATUS=:OLD.ACTIVESTATUS WHERE STUDENTID=:OLD.STUDENTID AND SUBJECTID=:OLD.SUBJECTID AND SUBJECTCODE=:OLD.SUBJECTCODE AND STUDYPROGRAMID=:OLD.STUDYPROGRAMID AND SCHOOLYEAR=:OLD.SCHOOLYEAR AND SEMESTER=:OLD.SEMESTER;
  6. -- AND NVL(INDEXPOINT,'-')=NVL(:OLD.LASTINDEX,'-');
  7.  
  8.     INSERT INTO LOGOFSCORE (STUDENTID,
  9.     SCHOOLYEAR,
  10.     SEMESTER,
  11.     SUBJECTCODE,
  12.     TAKENTO,
  13.     "INDEX",
  14.     "USER",
  15.     INPUTDATE,
  16.     OPERATION,
  17.     LASTINDEX,
  18.     NOTE,
  19.     COUNCILDATE,
  20.     SUBJECTID,
  21.     STUDYPROGRAMID) VALUES(:OLD.STUDENTID,
  22.     :OLD.SCHOOLYEAR,
  23.     :OLD.SEMESTER,
  24.     :OLD.SUBJECTCODE,
  25.     '\N',
  26.     :OLD.INDEXPOINT,
  27.     :OLD.UPDATEBY,
  28.     SYSDATE,
  29.     :OLD.OPERATION,
  30.     :OLD.LASTINDEX,
  31.     :OLD.NOTE,
  32.     :OLD.COUNCILDATE,
  33.     :OLD.SUBJECTID,
  34.     :OLD.STUDYPROGRAMID);
  35. END;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement