Line 49... |
Line 49... |
49 |
DECLARE done INT DEFAULT 0;
|
49 |
DECLARE done INT DEFAULT 0;
|
50 |
DECLARE subst INT DEFAULT 0;
|
50 |
DECLARE subst INT DEFAULT 0;
|
51 |
DECLARE _id_observation bigint(20) DEFAULT 0;
|
51 |
DECLARE _id_observation bigint(20) DEFAULT 0;
|
52 |
DECLARE _valid_ref varchar(20) DEFAULT NULL;
|
52 |
DECLARE _valid_ref varchar(20) DEFAULT NULL;
|
53 |
DECLARE cur1 CURSOR FOR SELECT id_observation, valid_ref FROM `BASEEDIT`.`cel_obs` c INNER JOIN T_bis b ON (b.num_nom = c.nom_sel_nn)
|
53 |
DECLARE cur1 CURSOR FOR SELECT id_observation, valid_ref FROM `BASEEDIT`.`cel_obs` c INNER JOIN T_bis b ON (b.num_nom = c.nom_sel_nn)
|
54 |
WHERE nom_referentiel IS NULL AND nom_sel_nn IS NOT NULL group by id_observation HAVING count(id_observation) = 1;
|
54 |
WHERE nom_referentiel IS NULL AND nom_sel_nn IS NOT NULL GROUP BY id_observation HAVING count(id_observation) = 1;
|
55 |
-- DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = TRUE;
|
55 |
-- DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = TRUE;
|
56 |
DECLARE CONTINUE HANDLER FOR SQLSTATE '02000' SET done = 1;
|
56 |
DECLARE CONTINUE HANDLER FOR SQLSTATE '02000' SET done = 1;
|
Line 57... |
Line 57... |
57 |
|
57 |
|
58 |
OPEN cur1;
|
58 |
OPEN cur1;
|