Bonjour,

j'ai 3 table:
planning_taches,plan_taches,traitements
plannings_taches à ID_plan_taches et plan_taches à ID_traitement.

dans plan_taches y a une colonne personnes.id_personnes.

j'ai fait 2 requêtes pour récupérer les personnes., le résultat est différents ,j'aimerai avoir un peu d'aide pour différencier les 2 et choisir la bonne.

REQUETE1
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
select distinct pt.personnes_id 
from planning_taches plt 
INNER JOIN plan_taches pt
 ON plt.plan_taches_id=pt.id 
INNER JOIN traitements tt
 ON  pt.traitements_id=tt.id 
where plt.fait='F'
 and plt.annulation='F'
 and plt.retrait='F'
 and plt.report='F' 
 and tt.etat_traitement=3
 or tt.etat_traitement=4 
order by pt.personnes_id ;
REQUETE2
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
select pt.personnes_id 
from planning_taches plt, plan_taches pt, traitements tt 
where plt.plan_taches_id=pt.id
 and pt.traitements_id=tt.id
 and plt.fait='F'
 and plt.annulation='F'
 and plt.retrait='F'
 and plt.report='F' 
 and tt.etat_traitement=3
 or tt.etat_traitement=4;
merci d'avance