Advertisement
Spirit13300

Untitled

Mar 21st, 2018
380
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PL/SQL 0.53 KB | None | 0 0
  1. DECLARE
  2.     CURSOR CURSE IS
  3.     SELECT  ET.NUM_ET,
  4.             ET.NOM_ET,
  5.             ET.PRENOM_ET,
  6.             M.CODE,
  7.             ((NVL(MOY_CC,0)*COEFF_CC)+(NVL(MOY_TEST,0)*COEFF_TEST)) / (COEFF_CC + COEFF_TEST) NOTE_GLOB
  8.     FROM    ETUDIANT ET
  9.     JOIN    NOTATION N ON ET.NUM_ET = N.NUM_ET
  10.     JOIN    MODULE M ON N.CODE = M.CODE
  11.     WHERE   ET.ANNEE = 2;
  12. BEGIN
  13.     FOR E IN CURSE
  14.     LOOP
  15.         INSERT INTO RESULTAT VALUES (E.NUM_ET, E.NOM_ET, E.PRENOM_ET, E.CODE, E.NOTE_GLOB);
  16.     END LOOP;
  17.    
  18.     COMMIT;
  19. END;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement