1 2 3 4
| SELECT T_Prestation.ID_Prestation, [T_Personne].[Nom_Personne] & " " & [T_Personne].[Prénom_Personne] AS [Nom Prenom], T_Prestation.Date_Début_Prestation, CDate(IIf([Date_Fin_Prestation] Is Null,Date(),[Date_Fin_Prestation])) AS date_completed, DateDiff("m",[Date_Début_Prestation],CDate(IIf([Date_Fin_Prestation] Is Null,Date(),[Date_Fin_Prestation]))) AS duree, [duree]/3 AS Carence, DateDiff("d",[Date_Début_Prestation],CDate(IIf([Date_Fin_Prestation] Is Null,Date(),[Date_Fin_Prestation]))) AS DureeJours, [DureeJours]/3 AS CarenceJours, Format(IIf(IsNull([T_Prestation].[Date_Fin_Prestation]),DateAdd("d",Date(),[CarenceJours]),""),"dd/mm/yyyy") AS DateRetour, [reqDuree1].EncartEnJrs
FROM T_Personne INNER JOIN T_Prestation ON T_Personne.CUID_Personne = T_Prestation.CUID_Prestation, reqDuree1 INNER JOIN T_Prestation ON reqDuree1.CUID_Personne = T_Prestation.CUID_Prestation
WHERE (((T_Personne.Nom_Personne & " " & T_Personne.Prénom_Personne) Not Like "*attente*") And ((T_Prestation.Date_Début_Prestation)<Date()) And ((T_Prestation.Statut_Personne)="externe")) AND (reqDuree1.ID_Prestation=reqDuree.ID_Prestation AND reqDuree1.DatePresta=reqDuree.date_completed),
ORDER BY [T_Personne].[Nom_Personne] & " " & [T_Personne].[Prénom_Personne], T_Prestation.Date_Début_Prestation; |
Partager