Mon programme n'affiche rien
Bonjour, je viens de lancer le programme suivant. il s’exécute sans erreur par contre n'affiche aucun résultat. Merci pour l'aide
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| DECLARE
tem_base number:=18;
v_DJU number(18,4);
v_dateobse DATE;
cursor obs_cursor IS SELECT dateobse,valeur_n from OBSERVATION
where codestat='60160001'
and codeelem='4' and codeperi='3'
and to_char(dateobse,'mm/yyyy')='05/2014';
BEGIN
OPEN obs_cursor;
LOOP
FETCH obs_cursor INTO v_dateobse,v_DJU;
EXIT WHEN obs_cursor%NOTFOUND;
IF (tem_base - v_DJU) > 0 then
DBMS_OUTPUT.PUT_LINE(v_dateobse ||' '||v_DJU);
ELSE
DBMS_OUTPUT.PUT_LINE(v_dateobse ||' '||0);
END IF;
END LOOP;
CLOSE obs_cursor;
END; |