G
galin
Hi folks,
I am trying to run a query which has to display Sum after specific
date.
I have
ID, Name, Date, PAYCODE and Paycode_hours
I want to run a query when I specify a date range lets say >1998
the Sum of PAYCODE (which can be REG,OVT,VAC..in my case REG)is
displayed in PAYCODE_Hours.
I specified the date (>1998), then I insert a criteria in the PAYCODE
(REG) and then I group by SUM Paycode_hours. What I am getting is the
hours worked for every single day, but not the SUM. I get the Sum only
if I delete the Date field.
This is my SQL code
SELECT Qkronhist.ID, Qkronhist.NAME, Qkronhist.PAYCODE_1,
Sum(Qkronhist.PAYCODE_1H) AS SumOfPAYCODE_1H
FROM Qkronhist
GROUP BY Qkronhist.ID, Qkronhist.NAME, Qkronhist.DATE,
Qkronhist.PAYCODE_1
HAVING (((Qkronhist.ID)=227) AND ((Qkronhist.DATE)>1997) AND
((Qkronhist.PAYCODE_1)="REG"));
I unchecked the Data box so it woud be invisible.
Please, help how to solve this issue
Galin
I am trying to run a query which has to display Sum after specific
date.
I have
ID, Name, Date, PAYCODE and Paycode_hours
I want to run a query when I specify a date range lets say >1998
the Sum of PAYCODE (which can be REG,OVT,VAC..in my case REG)is
displayed in PAYCODE_Hours.
I specified the date (>1998), then I insert a criteria in the PAYCODE
(REG) and then I group by SUM Paycode_hours. What I am getting is the
hours worked for every single day, but not the SUM. I get the Sum only
if I delete the Date field.
This is my SQL code
SELECT Qkronhist.ID, Qkronhist.NAME, Qkronhist.PAYCODE_1,
Sum(Qkronhist.PAYCODE_1H) AS SumOfPAYCODE_1H
FROM Qkronhist
GROUP BY Qkronhist.ID, Qkronhist.NAME, Qkronhist.DATE,
Qkronhist.PAYCODE_1
HAVING (((Qkronhist.ID)=227) AND ((Qkronhist.DATE)>1997) AND
((Qkronhist.PAYCODE_1)="REG"));
I unchecked the Data box so it woud be invisible.
Please, help how to solve this issue
Galin