SELECT
 (T_SAL.MatriculeSalarie + ' ' + isnull(T_SAL.Nom, '') + ' '  + isnull(T_SAL.Prenom, '') ) as Col1,
 'Arręt ('+ isnull(T_GHR.IntituleCourt, '') + ') jusqu''au ' + CONVERT(VARCHAR(12),T_ArretDeTravail.DateDeFin, 113) as Col2 
FROM
  T_PAI,
  T_SAL
  LEFT OUTER JOIN T_ArretDeTravail ON T_ArretDeTravail.NumeroSal=T_SAL.SA_CompteurNumero
  LEFT OUTER JOIN T_GHR ON T_ArretDeTravail.CodeNE =T_GHR.CodeNE
WHERE 
   (   (CURRENT_TIMESTAMP > DATEADD(DAY,0,T_ArretDeTravail.DateDeFin)) and
       (CURRENT_TIMESTAMP <= DATEADD(DAY,ISNULL(%NbJoursApres%,0),T_ArretDeTravail.DateDeFin) )
		
		 and (T_ArretDeTravail.CodeNE = isnull(%Nature1%,0) 
               OR T_ArretDeTravail.CodeNE = isnull(%Nature2%,0) 
               OR T_ArretDeTravail.CodeNE = isnull(%Nature3%,0)
               OR T_ArretDeTravail.CodeNE = isnull(%Nature4%,0) 
               OR T_ArretDeTravail.CodeNE = isnull(%Nature5%,0))
	    and (((T_ArretDeTravail.Statut <> 9) and (ISNULL(%StatutArret%,0) = 1)) OR  (ISNULL(%StatutArret%,0) = 0)) 
       )

Order by T_ArretDeTravail.DateDeFin

