1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| SELECT DISTINCT OCTIMEGT_ORREP.matricule,
RTRIM(sqloctime.dbo.pers.pers_nom) + ' ' + LTRIM(sqloctime.dbo.pers.pers_pre) AS Nom,
OCTIMEGT_PARAMACT.libelle,
sum(OCTIMEGT_ORREP.Tth) as tth
From OCTIMEGT_ORREP
INNER JOIN OCTIMEGT_OR ON OCTIMEGT_ORREP.nor = OCTIMEGT_OR.Nor AND OCTIMEGT_ORREP.code_ste = OCTIMEGT_OR.code_ste
INNER JOIN sqloctime.dbo.pers ON OCTIMEGT_ORREP.matricule = sqloctime.dbo.pers.pers_mat
INNER JOIN OCTIMEGT_PARAMACT ON OCTIMEGT_ORREP.activite = OCTIMEGT_PARAMACT.id_act
INNER JOIN sqloctime.dbo.nivprev ON sqloctime.dbo.nivprev.pers_mat = sqloctime.dbo.pers.pers_mat
WHERE (OCTIMEGT_OR.date_fact not between '02/01/1900' and '01/05/2003') AND
OCTIMEGT_ORREP.datj < '01/05/2003' AND
sqloctime.dbo.nivprev.niv_cod1 = '1' AND
sqloctime.dbo.nivprev.niv_cod2 = '4' AND
OCTIMEGT_ORREP.matricule = '735'
GROUP BY OCTIMEGT_ORREP.matricule,
sqloctime.dbo.pers.pers_nom,
sqloctime.dbo.pers.pers_pre,
OCTIMEGT_PARAMACT.Libelle |