Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE OR REPLACE FUNCTION valideSemestre(p_idEtudiant IN Etudiants.idEtudiant%TYPE, p_idSemestre IN Semestres.idSemestre%TYPE) RETURN VARCHAR IS
- v_moyenne NUMBER := moyenneEtudiantSemestreSansAbs(p_idEtudiant, p_idSemestre);
- v_module NUMBER;
- v_validemodule VARCHAR := 'O';
- BEGIN
- IF v_moyenne >= 10 THEN
- FOR etu_cur IN (SELECT mo.nommodule,mo.idmodule
- FROM Notes n JOIN Matieres m ON n.idmatiere=m.idmatiere JOIN Modules mo ON m.idmodule=mo.idmodule
- WHERE n.idetudiant=p_idEtudiant AND idsemestre=p_idsemestre
- GROUP BY mo.nommodule,mo.idmodule )
- LOOP
- v_module := valideEtudiantModule(p_idEtudiant, etu_cur.idmodule);
- IF v_module = 0 THEN
- v_validemodule := 'N';
- RETURN v_validemodule;
- ELSE
- RETURN v_validemodule;
- END IF;
- END LOOP
- ELSE
- v_validemodule := 'N';
- END IF;
- END;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement