SELECT DDate,;
Employer.Cnom AS Employer,;
Pause.cNom AS Pause,;
(nheures1+nheures2) AS SumHeures,;
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
WHERE Horaire.iPauseId # 0;
INTO CURSOR cAll
Is this Works for You?
>1 2 3 4 5 ..............................31
>
>LEJEUNE SANDRINE B B B
> 7.5 7.5 7.5
>
>
>
>( B is the Name of the pause )
>7.5 is the sum( nheures1 + nheures2 )
>
>
>
>Thank boris
>
>bernhart
>
>
>>My French is not too fluent (AT ALL) :o)))
>>
>>From that diagram, what data You need? Let's say for LEJEUNE Sandrine.
>>
>>
>>>Hi Borislav,
>>>
>>>I should like something taht
http://www.amline.be/Horaire.jpg>>>
>>>
>>>bernhart
>>>
>>>
>>>
>>>
>>>>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.