G
Guest
I've got a table called EMPLOYEE_DETAIL that tracks people as they move from
store to store. The table has the following fields:
STORE_NUM
SSN (Employee social)
QTR (Quarter)
START_DATE
END_DATE
START_DATE is obviously the date that the employee started working and
END_DATE - if not null - is the date the employee left.
I'm trying to create a query that shows all stores with no employees for
December. For the purposes of this scenario, if a store didn't have employees
on 12/1 then it didn't have any for the month.
I can do something like SELECT * FROM EMPLOYEE_DETAIL WHERE END_DATE <
#12/1/2004# to find employees who left prior to 12/1. I can use the GROUP BY
clause to find a list of stores that had one or more employees leave before
12/1. However, that doesn't take into account that a store might have had
other employees who DIDN'T leave at all.
I think I need to add the table to the query again and link it to itself,
but I'm not quite sure how to make this query behave the way I want.
Access 2000. Thanks.
store to store. The table has the following fields:
STORE_NUM
SSN (Employee social)
QTR (Quarter)
START_DATE
END_DATE
START_DATE is obviously the date that the employee started working and
END_DATE - if not null - is the date the employee left.
I'm trying to create a query that shows all stores with no employees for
December. For the purposes of this scenario, if a store didn't have employees
on 12/1 then it didn't have any for the month.
I can do something like SELECT * FROM EMPLOYEE_DETAIL WHERE END_DATE <
#12/1/2004# to find employees who left prior to 12/1. I can use the GROUP BY
clause to find a list of stores that had one or more employees leave before
12/1. However, that doesn't take into account that a store might have had
other employees who DIDN'T leave at all.
I think I need to add the table to the query again and link it to itself,
but I'm not quite sure how to make this query behave the way I want.
Access 2000. Thanks.