Bonjour,
Je suis en train de migrer des requetes access en Linq 3.5
Je suis donc obligé d'enlever les LEFT JOIN de mes requetes car avec le framework 3.5, ce n'est pas possible de le faire
Mes left join sont dans des sous requetes
J'ai besoin d'aide pour choisir une alternative au left join dans mes requetes
Voici le code SQL :
Et voici la requete que j'ai fait :
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 SELECT Tbl_TP.[Identifiant intervention], Tbl_Multi_Intervenants.[Identifiant tâche], Tbl_TP.[Société Intervenant] + '|' + Tbl_TP.[Nom - prénom intervenant] + '|' + Tbl_TP.[GSM Intervenant] + '|' + Tbl_TP.[Mail Intervenant] + '/' AS Intervenants FROM Tbl_TP INNER JOIN (Tbl_Multi_Intervenants LEFT JOIN Tbl_Traitement_GAPP ON Tbl_Multi_Intervenants.[Identifiant tâche] = Tbl_Traitement_GAPP.[Identifiant tâche]) ON Tbl_TP.[Identifiant tâche] = Tbl_Multi_Intervenants.[Identifiant tâche] GROUP BY Tbl_TP.[Identifiant intervention], Tbl_Multi_Intervenants.[Identifiant tâche], Tbl_TP.[Société Intervenant] + '|' + Tbl_TP.[Nom - prénom intervenant] + '|' + Tbl_TP.[GSM Intervenant] + '|' + Tbl_TP.[Mail Intervenant] + '/'
Comme les deux requêtes ne renvoient pas le même nombre de lignes, je me doute que j'ai fait une 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 SELECT Tbl_TP.[Identifiant intervention], Tbl_Multi_Intervenants.[Identifiant tâche], Tbl_TP.[Société Intervenant] + '|' + Tbl_TP.[GSM Intervenant] + '|' + Tbl_TP.[Mail Intervenant] + '/' AS Intervenants FROM Tbl_TP INNER JOIN Tbl_Multi_Intervenants ON Tbl_TP.[Identifiant tâche] = Tbl_Multi_Intervenants.[Identifiant tâche] GROUP BY Tbl_TP.[Identifiant intervention], Tbl_Multi_Intervenants.[Identifiant tâche], Tbl_TP.[Société Intervenant] + '|' + Tbl_TP.[GSM Intervenant] + '|' + Tbl_TP.[Mail Intervenant] + '/' UNION ( SELECT Tbl_TP.[Identifiant intervention], Tbl_Multi_Intervenants.[Identifiant tâche], Tbl_TP.[Société Intervenant] + '|' + Tbl_TP.[Nom - prénom intervenant] + '|' + Tbl_TP.[GSM Intervenant] + '|' + Tbl_TP.[Mail Intervenant] + '/' FROM Tbl_TP,Tbl_Multi_Intervenants WHERE NOT EXISTS ( SELECT * FROM Tbl_Multi_Intervenants WHERE Tbl_TP.[Identifiant tâche] = Tbl_Multi_Intervenants.[Identifiant tâche] ) GROUP BY Tbl_TP.[Identifiant intervention], Tbl_Multi_Intervenants.[Identifiant tâche], Tbl_TP.[Société Intervenant] + '|' + Tbl_TP.[Nom - prénom intervenant] + '|' + Tbl_TP.[GSM Intervenant] + '|' + Tbl_TP.[Mail Intervenant] + '/' )
Pouvez-vous m'aiguiller ?
Merci d'avance
Partager