Slt,
 
Cette fonction est déclenchée par un trigger mais il n'y a rien qui se passe!
Vous voyez une anomalie, merci
 
| Code : 
 DECLAREnbLignes int4;gauche int4;droit int4; BEGIN nbLignes:=-1;gauche:=0;droit:=0;select n_gauche into gauche from noeuddp where idtypenoeud=4 and n_gauche<=NEW.n_gauche and n_droit>=NEW.n_droit;select n_droit into droit from noeuddp where idtypenoeud=4 and n_gauche<=NEW.n_gauche and n_droit>=NEW.n_droit;select count(*) into nbLignes from noeuddp where nomnoeud = NEW.nomnoeud and n_gauche<=gauche and n_droit>=droit;      IF    (1 < nbLignes)       then         update noeuddp set doublon=1 where nomnoeud = NEW.nomnoeud and n_gauche<=gauche and n_droit>=droit;      ELSE	update noeuddp set doublon=0 where nomnoeud = NEW.nomnoeud and n_gauche<=gauche and n_droit>=droit;      END IF;  RETURN NEW; END;
 |