Sorry, I get the same results using LEFT JOIN.
However one thing I've noticed is that when I first used your code ACCESS inserts AS twice into the second line so that it looks as follows:
FROM Staff AS S INNER JOIN Transfer AS T ON S.Staff_ID=T.Staff_ID
I don't know if that affects the...
PHV, your SQL code is a step in the right direction, but it only returns a list of people that have had a change in hours.
I need to return a list of all staff and their current hours, so for the staff that have not changed hours they still need to be listed, but their starting hours will be...
I need to clarify that my most recent post was in response to PHV's request for the structure of two tables.
In response to M8KWR there is no limit to the number of times somebody could change their hours, although it unlikely to happen on a weekly basis, and probably not every month either...
Table:Staff Table:Transfer
Field:Staff_ID Field:Transfer_ID
Field:Staff_Name Field:Staff_ID
Field:Date_Started Field:New_Hours
Field:Starting_Hours Field:Date_Effective_From
Field:Status
Staff.Staff_ID is linked in a one to many...
All of your assumptions are correct. However, I may want to look for staff and their hours a year ago, and so would be querying the most recent date change at that point in time.
I have a table with a set of names (Staff), their start date with company, their original working hours, plus other info. I have another table (Shift_Change) which allows you to choose a name and enter their new working hours, and the date they are effective from.
As a person can in theory...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.