Hi Bernhart,
Did every record in Horaire.dbf has iPauseID, or only some records have? What You need to select, only these records that have iPauseId or All records per day per employe?
1. All records have iPauseId, records are grouped per day, per employer & iPauseId
SELECT DDate,;
Employer.Cnom AS Employer,;
Pause.cNom AS Pause,;
SUM(nheures1) AS SumHeures1,;
SUM(nheures2) AS SumHeures2;
FROM Horaire;
LEFT JOIN Employe ON Horaire.iemployeeid = Employe.Iid;
LEFT JOIN Pause ON Horaire.iPauseId = Pause.Iid;
GROUP BY Horaire.DDate, Horaire.iEmployeId, Horaire.iPauseId, 2,3
INTO CURSOR cAll
>Horaire.dbf
>iid i
>ddate d
>iemployeeid i
>ipauseId i
>nheures1 n(7,3)
>cTaux1 c(3)
>nheures2 n(7,3)
>cTaux2 c(3)
>1) the name of Pause.cnom
>
>2) The SUM( nHeures1 )
>3) The SUM ( nHeures2 )
>Bonjour à tous(tes),
>Hi all,
>
>We Have :
>
>Employe.dbf
>Cnom c(30)
>iid i
>
>Horaire.dbf
>iid i
>ddate d
>iemployeeid i
>ipauseId i
>nheures1 n(7,3)
>cTaux1 c(3)
>nheures2 n(7,3)
>cTaux2 c(3)
>
>Pause.dbf
>cnom C(3)
>iid i
>
>
>We Wants a table ( or cursor ) with per day(horaire.iid ) and employee(iemployeid)
>
>1) the name of Pause.cnom
>
>2) The SUM( nHeures1 )
>3) The SUM ( nHeures2 )
>
>How can i have that ?
>
>thank in advance
>
>Sorry for my poor English...
>
>
>Bernhart
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.