1 2 3 4 5 6 7
| TRANSFORM Sum(HeuresFormateurs.NbHeure) AS SommeDeNbHeure
SELECT HeuresFormateurs.IdBudgetaire, UCase([Formateurs].[Nom]) & " " & [Formateurs].[Prenom] AS Formateur, Statuts.Libelle AS Statut, AnnexeHeures.Nb AS Prevu, nz([LettresVacation].[NbHeure],0) AS LV, Sum(HeuresFormateurs.NbHeure) AS TotalFormateur
FROM ((Statuts RIGHT JOIN ((Formateurs RIGHT JOIN HeuresFormateurs ON Formateurs.N°=HeuresFormateurs.IdFormateur) LEFT JOIN AnnexeBudgetaire ON HeuresFormateurs.IdBudgetaire=AnnexeBudgetaire.N°) ON Statuts.N°=Formateurs.Statut) LEFT JOIN AnnexeHeures ON (HeuresFormateurs.IdBudgetaire=AnnexeHeures.IdAnnexe) AND (HeuresFormateurs.IdFormateur=AnnexeHeures.IdFormateur) AND (HeuresFormateurs.TypeHeure=AnnexeHeures.IdTypeHeure)) LEFT JOIN LettresVacation ON (HeuresFormateurs.IdBudgetaire=LettresVacation.IdAnnexe) AND (HeuresFormateurs.IdFormateur=LettresVacation.IdFormateur) AND (HeuresFormateurs.TypeHeure=LettresVacation.IdTypeHeure)
WHERE (((HeuresFormateurs.TypeHeure)=1))
GROUP BY HeuresFormateurs.IdBudgetaire, UCase([Formateurs].[Nom]) & " " & [Formateurs].[Prenom], Statuts.Libelle, AnnexeHeures.Nb, nz([LettresVacation].[NbHeure],0)
ORDER BY UCase([Formateurs].[Nom]) & " " & [Formateurs].[Prenom]
PIVOT HeuresFormateurs.Mois In ("01","02","03","04","05","06","07","08","09","10","11","12"); |
Partager