je ne comprends pas a quoi correspond l'erreur donc voici mon code:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33 DECLARE empl courrier_empl.num_emp%TYPE; noml courrier_empl.nom%TYPE; dptl courrier_empl.num_dept%TYPE; sala courrier_empl.salaire%TYPE; nempl NUMBER(4); nnoml CHAR(10); ndptl NUMBER(4); nsala NUMBER(7,2); TYPE type_employes IS TABLE OF employes%ROWTYPE; num_emp type_employes; nom type_employes; num_dept type_employes; salaire type_employes; i employes.salaire%TYPE; BEGIN --i:=type_employes(num_emp,nom,num_dept,salaire); FOR i IN salaire.first..salaire.last //ORA-06531:réference a un ensemble non initialisé LOOP SELECT num_emp,nom,num_dept,salaire INTO nempl,nnoml,ndptl,nsala FROM employes WHERE salaire>2331.00; INSERT INTO courrier_empl VALUES (nempl,nnoml,ndptl,nsala); END LOOP; END; /
Partager