SELECT
 (T_SAL.MatriculeSalarie + ' ' + isnull(T_SAL.Nom, '') + ' '  + isnull(T_SAL.Prenom, '') ) as Col1,
 'Date de fin d''absence : '+ CONVERT(VARCHAR(12),T_GHRSAL.PeriodeFin, 113) as Col2 
FROM
  T_PAI,
  T_SAL
  LEFT OUTER JOIN T_GHRSAL ON T_GHRSAL.NumSalarie=T_SAL.SA_CompteurNumero
WHERE ( ( ISNULL(%Mois%,0) = 0 
        AND T_GHRSAL.PeriodeFin >= dateadd(month,((T_PAI.AnneeEnCours-1900)*12)+T_PAI.MoisEnCours-1, 1-1)-1
        AND T_GHRSAL.PeriodeDebut <= dateadd(month,((T_PAI.AnneeEnCours-1900)*12)+T_PAI.MoisEnCours-1, 1-1)-1
        )
       OR
        ( ISNULL(%Mois%,0) = 1 
        AND T_GHRSAL.PeriodeFin >= dateadd(month,((T_PAI.AnneeEnCours-1900)*12)+T_PAI.MoisEnCours-1-1, 1-1)-1
        AND T_GHRSAL.PeriodeDebut <= dateadd(month,((T_PAI.AnneeEnCours-1900)*12)+T_PAI.MoisEnCours-1-1, 1-1)-1
        )
      )  
      and (T_GHRSAL.CodeNE = isnull(%NatureAbsence1%,0) 
           OR T_GHRSAL.CodeNE = isnull(%NatureAbsence2%,0) 
           OR T_GHRSAL.CodeNE = isnull(%NatureAbsence3%,0)
          )
Order by T_SAL.MatriculeSalarie, T_GHRSAL.CodeNE