Bonjour,
Je fais encore appel à vos connaissances car je bloque depuis un petit moment sur ce problème.
Voici le script que je dois exécuter sur ma base :
Voici le résultat des logs obtenus :
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54 CREATE TEMP TABLE tempTableInputSlot ( dslam VARCHAR(8), shelf VARCHAR(2), slot INTEGER ) WITH NO LOG; CREATE TEMP TABLE tempTableInputSlot2 ( shelf VARCHAR(8), slot INTEGER ) WITH NO LOG; CREATE INDEX tempTableInputSlot_indShelf ON tempTableInputSlot(shelf); CREATE INDEX tempTableInputSlot_indDslam ON tempTableInputSlot(dslam); LOAD FROM '$FILE_INPUT_NODE' DELIMITER ';' INSERT INTO tempTableInputSlot (dslam,shelf,slot); UPDATE tempTableInputSlot set shelf="0"||shelf where LENGTH(shelf)=1; INSERT INTO tempTableInputSlot2 Select Equip.id,tempTableInputSlot.slot From tempTableInputSlot INNER JOIN manelem on tempTableInputSlot.dslam = manelem.x3024_3_mychars INNER JOIN Equip on Equip.x3011_9_cmMe = manelem.id and Equip.x3011_1_mychars[9,11] = "L"||tempTableInputSlot.shelf; CREATE PROCEDURE braProc_updateShelfRemarks() DEFINE w_slot INT; DEFINE w_shelf CHAR(8); DEFINE w_remarks CHAR(255); FOREACH curr1 FOR SELECT tempTableInputSlot2.shelf, tempTableInputSlot2.slot INTO w_shelf, w_slot FROM tempTableInputSlot2; select X3011_18_mychars INTO w_remarks FROM EQUIP WHERE Equip.id=w_shelf; LET w_remarks=SUBSTR(w_remarks,146,146+w_slot-1)||"O"||SUBSTR(w_remarks,147+w_slot-1,170); update Equip set X3011_18_mychars=w_remarks where Equip.id=w_shelf; END FOREACH; END PROCEDURE; UPDATE STATISTICS FOR PROCEDURE braProc_updateShelfRemarks(); EXECUTE PROCEDURE braProc_updateShelfRemarks(); DROP PROCEDURE braProc_updateShelfRemarks; DROP TABLE tempTableInputSlot; DROP TABLE tempTableInputSlot2;
Je ne comprends pas l'erreur "No more processes". Quand je supprime la requête "INSERT" juste avant la déclaration de la procédure, tout fonctionne. De même, lorsque je supprime la requête "UPDATE" dans la procédure, ça fonctionne aussi. Mais quand je laisse les 2, j'obtiens ce message d'erreur.
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94 CREATE TEMP TABLE tempTableInputSlot ( dslam VARCHAR(8), shelf VARCHAR(2), slot INTEGER ) WITH NO LOG; --Temporary table created. CREATE TEMP TABLE tempTableInputSlot2 ( shelf VARCHAR(8), slot INTEGER ) WITH NO LOG; --Temporary table created. CREATE INDEX tempTableInputSlot_indShelf ON tempTableInputSlot(shelf); --Index created. CREATE INDEX tempTableInputSlot_indDslam ON tempTableInputSlot(dslam); --Index created. LOAD FROM 'slot.txt' DELIMITER ';' INSERT INTO tempTableInputSlot (dslam,shelf,slot); --1 row(s) loaded. UPDATE tempTableInputSlot set shelf="0"||shelf where LENGTH(shelf)=1; --0 row(s) updated. INSERT INTO tempTableInputSlot2 Select Equip.id,tempTableInputSlot.slot From tempTableInputSlot INNER JOIN manelem on tempTableInputSlot.dslam = manelem.x3024_3_mychars INNER JOIN Equip on Equip.x3011_9_cmMe = manelem.id and Equip.x3011_1_mychars[9,11] = "L"||tempTableInputSlot.shelf; --1 row(s) inserted. CREATE PROCEDURE braProc_updateShelfRemarks() DEFINE w_slot INT;; DEFINE w_shelf CHAR(8);; DEFINE w_remarks CHAR(255);; FOREACH curr1 FOR SELECT tempTableInputSlot2.shelf, tempTableInputSlot2.slot INTO w_shelf, w_slot FROM tempTableInputSlot2;; select X3011_18_mychars INTO w_remarks FROM EQUIP WHERE Equip.id=w_shelf;; LET w_remarks=SUBSTR(w_remarks,146,146+w_slot-1)||"O"||SUBSTR(w_remarks,147+w_slot-1,170);; update Equip set X3011_18_mychars=w_remarks where Equip.id=w_shelf;; END FOREACH; END PROCEDURE; --Routine created. ; UPDATE STATISTICS FOR PROCEDURE braProc_updateShelfRemarks(); --Routine Statistics updated. EXECUTE PROCEDURE braProc_updateShelfRemarks(); --746: 23 --No more processes --Error in line 1 --Near character position 2 DROP PROCEDURE braProc_updateShelfRemarks; --Routine dropped. -- Suppression des tables temporaires et des procedures DROP TABLE tempTableInputSlot; --Table dropped. DROP TABLE tempTableInputSlot2; --Table dropped.
Est-ce que quelqu'un aurait une idée ?
Partager