Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cross Tables and syntax sql
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00950444
Message ID:
00950640
Views:
20
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform