next up previous contents
Next: 5.3.2 Utilisation d'un enregistrement Up: 5.3 Traitement des lignes Previous: 5.3 Traitement des lignes   Contents

5.3.1 Utilisation de variables indépendantes

Ex : DECLARE

     CURSOR c_fonction IS
           SELECT nom, prnm, sx, qualif, DECODE(qualif,'AIDE SOIGNANTE','1',
                  'INFIRMIERE','2', 'INTERNE','3','9')
           FROM personnel
           ORDER BY 5;

     nom                 personnel.nom%TYPE;
     prenom              personnel.prnm%TYPE;
     sexe                personnel.sx%TYPE;
     fonction            personnel.qualif% TYPE;
     cdqualif            CHAR(1);
    BEGIN
    ...FETCH c_fonction INTO nom, prenom, sexe, fonction, cdqualif;
    END;


Florence Bannay 2000-11-13