1 2 3 4 5 6 7 8 9 10 11 12 13 14
| SELECT dbo.DRH_T_formations.id_theme, MIN(dbo.DRH_T_dates.date_formation) AS date_ini, dbo.DRH_T_formations.nom_formation,
dbo.DRH_T_organismes.nom_organisme, dbo.DRH_T_calendrier.deductible, dbo.DRH_T_calendrier.categorie, dbo.DRH_T_participants.mec,
dbo.DRH_T_histoire.categorie AS Expr1, dbo.DRH_T_histoire.date_debut, dbo.DRH_T_histoire.date_fin
FROM dbo.DRH_T_histoire RIGHT OUTER JOIN
dbo.DRH_T_participants ON dbo.DRH_T_histoire.mec = dbo.DRH_T_participants.mec RIGHT OUTER JOIN
dbo.DRH_T_calendrier ON dbo.DRH_T_participants.id_calendrier = dbo.DRH_T_calendrier.id_calendrier LEFT OUTER JOIN
dbo.DRH_T_formations ON dbo.DRH_T_calendrier.id_formation = dbo.DRH_T_formations.id_formation LEFT OUTER JOIN
dbo.DRH_T_organismes ON dbo.DRH_T_calendrier.id_organisme = dbo.DRH_T_organismes.id_organisme LEFT OUTER JOIN
dbo.DRH_T_dates ON dbo.DRH_T_calendrier.id_calendrier = dbo.DRH_T_dates.id_calendrier
GROUP BY dbo.DRH_T_dates.date_formation, dbo.DRH_T_formations.id_theme, dbo.DRH_T_formations.nom_formation,
dbo.DRH_T_organismes.nom_organisme, dbo.DRH_T_calendrier.categorie, dbo.DRH_T_calendrier.deductible, dbo.DRH_T_calendrier.id_formation,
dbo.DRH_T_participants.mec, dbo.DRH_T_histoire.categorie, dbo.DRH_T_histoire.date_debut, dbo.DRH_T_histoire.date_fin
HAVING (YEAR(dbo.DRH_T_dates.date_formation) = 2010) |
Partager