hi, i want to count how many days employees worked within last 30 days (if they qualify for statutory holiday) but my query gives me empty record set:
SELECT Query3A.EMPID, Query3A.FULL_NAME, Count(Query3A.WDAYS) AS WDS
FROM Query3A
WHERE (((Query3A.WDAYS) Between (Now()-30) And Now()))
GROUP BY Query3A.EMPID, Query3A.FULL_NAME;
query without 'where' gives me the correct number:
SELECT Query3A.EMPID, Query3A.FULL_NAME, Count(Query3A.WDAYS) AS WDS
FROM Query3A
GROUP BY Query3A.EMPID, Query3A.FULL_NAME;
EMPID FULL_NAME WDS
0154 BILLINGSLEY, CHRIS 8
0220 GIBSON, BRENT 4
0262 SCHWARZ, STEVEN 10
...
or
SELECT Query3A.EMPID, Query3A.FULL_NAME, Count(Query3A.WDAYS) AS WDS, Query3A.WDAYS
FROM Query3A
GROUP BY Query3A.EMPID, Query3A.FULL_NAME, Query3A.WDAYS;
EMPID FULL_NAME WDS WDAYS
0154 BILLINGSLEY, CHRIS 1 June 15, 2012
0154 BILLINGSLEY, CHRIS 1 June 8, 2012
0154 BILLINGSLEY, CHRIS 1 June 9, 2012
0220 GIBSON, BRENT 1 June 12, 2012
0220 GIBSON, BRENT 1 June 13, 2012
0220 GIBSON, BRENT 1 June 14, 2012
0220 GIBSON, BRENT 1 June 15, 2012
0262 SCHWARZ, STEVEN 1 June 1, 2012
0262 SCHWARZ, STEVEN 1 June 10, 2012
0262 SCHWARZ, STEVEN 1 June 2, 2012
...
any help, please?
SELECT Query3A.EMPID, Query3A.FULL_NAME, Count(Query3A.WDAYS) AS WDS
FROM Query3A
WHERE (((Query3A.WDAYS) Between (Now()-30) And Now()))
GROUP BY Query3A.EMPID, Query3A.FULL_NAME;
query without 'where' gives me the correct number:
SELECT Query3A.EMPID, Query3A.FULL_NAME, Count(Query3A.WDAYS) AS WDS
FROM Query3A
GROUP BY Query3A.EMPID, Query3A.FULL_NAME;
EMPID FULL_NAME WDS
0154 BILLINGSLEY, CHRIS 8
0220 GIBSON, BRENT 4
0262 SCHWARZ, STEVEN 10
...
or
SELECT Query3A.EMPID, Query3A.FULL_NAME, Count(Query3A.WDAYS) AS WDS, Query3A.WDAYS
FROM Query3A
GROUP BY Query3A.EMPID, Query3A.FULL_NAME, Query3A.WDAYS;
EMPID FULL_NAME WDS WDAYS
0154 BILLINGSLEY, CHRIS 1 June 15, 2012
0154 BILLINGSLEY, CHRIS 1 June 8, 2012
0154 BILLINGSLEY, CHRIS 1 June 9, 2012
0220 GIBSON, BRENT 1 June 12, 2012
0220 GIBSON, BRENT 1 June 13, 2012
0220 GIBSON, BRENT 1 June 14, 2012
0220 GIBSON, BRENT 1 June 15, 2012
0262 SCHWARZ, STEVEN 1 June 1, 2012
0262 SCHWARZ, STEVEN 1 June 10, 2012
0262 SCHWARZ, STEVEN 1 June 2, 2012
...
any help, please?