## PCD_GROUPES_PARENTES

Doc
Details
Grants
References
Dependencies
Code

TEXT
    PROCEDURE PCD_GROUPES_PARENTES(pid_groupe IN NUMBER, pid_etudiant IN NUMBER)
    AS
    BEGIN

     BEGIN

      delete groupes_parentes where pf_fils = pid_etudiant
                              and pf_pere in (select pf_fils from groupes_parentes
                                              where pf_pere = (select p_id from groupes, groupes_parentes
                                                               where f_type in (select p_id from types_groupes
                                                                                 where libelle = 'partition')
                                                                and pf_fils=pid_groupe
                                                                and pf_pere=p_id));

     EXCEPTION WHEN NO_DATA_FOUND THEN
      null;
     END;

     insert into groupes_parentes(pf_pere, pf_fils) values (pid_groupe, pid_etudiant);

    END PCD_GROUPES_PARENTES;