1 2 3 4 5 6 7 8 9 10 11
| TRANSFORM Sum(Temp_CPTMOIS.CPA32) AS SommeDeCPA32
SELECT 0 AS Ordre, Temp_CPTMOIS.CMATR5 AS CODE, Temp_SALARN.NOMSAN AS NOMSAN, Temp_SALARN.PRENON AS PRENON
FROM Temp_CPTMOIS LEFT JOIN Temp_SALARN ON Temp_CPTMOIS.CMATR5 = Temp_SALARN.CDMATN
GROUP BY 0, Temp_CPTMOIS.CMATR5, Temp_SALARN.NOMSAN, Temp_SALARN.PRENON
PIVOT Temp_CPTMOIS!CANNEE & Temp_CPTMOIS!CMOIS
UNION
TRANSFORM Avg(CLng(nz([CPA32],0))) AS Moyenne
SELECT 1 AS Ordre, Count(Temp_CPTMOIS!CMATR5) AS CODE, Count(Temp_SALARN.NOMSAN) AS NOMSAN, Count(Temp_SALARN.PRENON) AS PRENON
FROM Temp_CPTMOIS LEFT JOIN Temp_SALARN ON Temp_CPTMOIS.CMATR5 = Temp_SALARN.CDMATN
GROUP BY 1
PIVOT Temp_CPTMOIS!CANNEE & Temp_CPTMOIS!CMOIS; |
Partager