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 37 38 39 40
|
SELECT
I.Int_ID,
PM.ProcM_Dir_id,
I.Int_DateHeureDebut,
IIf(I.Int_DateHeureFin Is Null,Format(pDateFin,"dd/mm/yyyy"" 23"":""59"":""59"""),
I.Int_DateHeureFin) AS Int_DateHeureFinX,
A.App_ID,
A.App_Libelle,
F.Fct_ID,
F.Fct_Libelle,
PM.ProcM_ID,
PM.ProcM_Code,
PM.ProcM_Libelle,
I.Int_Description,
I.Int_Inc_Cause,
I.Int_Inc_Action,
DateDiff("n",I.Int_DateHeureDebut,I.Int_DateHeureFin) AS DureeTotaleMinutes,
DateDiff("s",I.Int_DateHeureDebut,I.Int_DateHeureFin) AS DureeTotaleSecondes,
Int(DureeTotaleSecondes/(24*60*60)) AS DureeJ,
Int((DureeTotaleSecondes-(DureeJ*24*60*60))/(60*60)) AS DureeH,
Int((DureeTotaleSecondes-(DureeJ*24*60*60)-(DureeH*60*60))/60) AS DureeM,
Int(DureeTotaleSecondes-(DureeJ*24*60*60)-(DureeH*60*60)-(DureeM*60)) AS DureeS
FROM
ProcessusMetier AS PM
RIGHT JOIN Fonction AS F
ON PM.ProcM_ID = F.Fct_ProcM_id,
Application AS A
RIGHT JOIN (lk_InterruptionFonction AS IntF
RIGHT JOIN vw_Int_Periode AS I ON IntF.IF_Int_id = I.Int_ID)
ON A.App_ID = I.Int_App_id
WHERE
(((PM.ProcM_Dir_id)=[pDirID]))
GROUP BY
A.App_Libelle
ORDER BY
A.App_Libelle, F.Fct_Id, I.Int_DateHeureDebut; |
Partager