G
Guest
Hi, I'm a begginer in Acces, so probably I will ask you with a basic question.
I have a table with the following records:
Table Name is TB_Tst
- Project
- Date
- Hours
And I want to have the total o hours per month:
The query result is:
-Project
- Year
- Month
- Total of Hours
I made the query bellow, but the sum of hours is wrong, could you help me?
SELECT TB_Tst.project as Name,Year(TB_Tst.Date) as Year,
Month(Cdate(TB_Tst.Date)) as Month, sum(Cdate(hour)) as Hours
GROUP BY Name, Year, Month
The hours output is the hours in the first day of month.
Ex:
Project: test
Date: 01-01-2005
Hours: 10:00
Project: test
Date: 01-01-2005
Hours: 5:00
The query output is:
Project:test
Year: 2005
Month:1
Hours: 10:00 (Is the first input in the table, In this field I want 15:00)
Could you help me?
Thanks a lot
I have a table with the following records:
Table Name is TB_Tst
- Project
- Date
- Hours
And I want to have the total o hours per month:
The query result is:
-Project
- Year
- Month
- Total of Hours
I made the query bellow, but the sum of hours is wrong, could you help me?
SELECT TB_Tst.project as Name,Year(TB_Tst.Date) as Year,
Month(Cdate(TB_Tst.Date)) as Month, sum(Cdate(hour)) as Hours
GROUP BY Name, Year, Month
The hours output is the hours in the first day of month.
Ex:
Project: test
Date: 01-01-2005
Hours: 10:00
Project: test
Date: 01-01-2005
Hours: 5:00
The query output is:
Project:test
Year: 2005
Month:1
Hours: 10:00 (Is the first input in the table, In this field I want 15:00)
Could you help me?
Thanks a lot