Bonjour,
J'ai besoin d'aide pour une requête avec un LEFT JOIN. J'ai fait une requête qui marche :
Seulemnt, j'aimerais aussi ajouter des contraintes par rapport à une autre table nommée Prix. Voilà ce que je fais :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3 SELECT Jockey.Nom, Jockey.Prénom, IIf(Sum([Palmares].[Gain]) is null, 0, Sum([palmares].[Gain])) AS Gains FROM Jockey LEFT JOIN Palmares ON Palmares.Jockey = Jockey.NumAuto GROUP BY Jockey.Nom, Jockey.Prénom;
Cela ne fonctionne pas et je voudrais savoir comment faire. Pouvez-vous m'aider ?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5 SELECT Jockey.Nom, Jockey.Prénom, IIf(Sum([Palmares].[Gain]) is null, 0, Sum([palmares].[Gain])) AS Gains FROM Jockey LEFT JOIN Palmares ON Palmares.Jockey = Jockey.NumAuto, Prix WHERE Palmares.Prix = Prix.NumAuto AND (([Prix].[Date]>=#1/1/2006#) And ([Prix].[Date]<=#6/1/2006#)) GROUP BY Jockey.Nom, Jockey.Prénom;
Partager