Hi All,
I have a db that tracks employee education.
In the Employees table, I have a HireDate field.
The Classes table hold all the classes.
The ClassesTaken table links the two keeping track of who took what and when.
What I need is a way to figure the anniversary date in the current year based on HireDate. If it is before Today, I need all classes taken between that anniversary date and today. If it is after today, I need all classes taken between the PREVIOUS anniversary date and Today.
I can't figure out how to calculate the date and pass it to a 'Between' in a query. I would think theres a way to do it without a Between, but I don't know enough SQL to even attempt it.
Naturally this is a rush, as state surveyors could walk in any day and want this info for our CNA's. Any help will be very much appreciated.
Thank you
-Jeff
I have a db that tracks employee education.
In the Employees table, I have a HireDate field.
The Classes table hold all the classes.
The ClassesTaken table links the two keeping track of who took what and when.
What I need is a way to figure the anniversary date in the current year based on HireDate. If it is before Today, I need all classes taken between that anniversary date and today. If it is after today, I need all classes taken between the PREVIOUS anniversary date and Today.
I can't figure out how to calculate the date and pass it to a 'Between' in a query. I would think theres a way to do it without a Between, but I don't know enough SQL to even attempt it.
Naturally this is a rush, as state surveyors could walk in any day and want this info for our CNA's. Any help will be very much appreciated.
Thank you
-Jeff