Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Select SUM and calculate sum() different values
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00382827
Message ID:
00383105
Views:
20
>The SQl select doesn't need a group by because it is returning one record for the sum for one employee. If i was doing multiple employees and reporting back then i would need the group by.

Try it first and let us see the result:

SELECT SUM(hrs_driving+hrs_onduty) AS 'results1' ;
FROM logs!logs INTO CURSOR 'test1' ;
WHERE logs.employee_code = THISFORM.EMPLOYEE_CODE1.Text1.VALUE ;
AND BETWEEN(logs.txdate,rdates(2),rdates(1)) GROUP BY logs.employee_code ORDER BY logs.employee_code
JESS S. BANAGA
Project Leader - SDD division
...shifting from VFP to C#.Net

CHARISMA simply means: "Be more concerned about making others feel good about themselves than you are in making them feel good about you."
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform