I have a table of training items and staff will complete these a number of times. What I want to be able to do is just show one of each training item and it to be the latest one.
Thank you
I have a table of training items and staff will complete these a number of times. What I want to be able to do is just show one of each training item and it to be the latest one.
Thank you
Your post may be a little confusing. Often with Employees and Training, you have to consider the Job/Position as well. Often a Job/Position has certain requirements, Employees can be moved into Jobs/Positions and Employees have certain qualifications related to Training.
See the attached jpg for some ideas.
Also, you say you only want toDo you want to store history records, or just store the latest record?What I want to be able to do is just show one of each training item and it to be the latest one.
Good luck with your project.
I have a number of tables with info on the staff and then the training sessions they have done and what those training sessions have covered. These records are kept but I want a query to show the latest one so then I can show what training is required and if stuff is out of date.
How do you know what "stuff is out of date"?
Can you show us a jpg of your tables and relationships?
To get the latest (most recent) records you use the TrainingDate along this manner, let's deal with EmployeeX for example:
Code:Select * from Training where EmployeeName ="EmployeeX" and TrainingDate = (select Max(TrainingDate) from Training WHERE EmployeeName ="EmployeeX")
As you can see I've got a number of tables with all the relevant info on them. Each Training ID corosponds to a training need which has a training interval which is x number of days. So my hope is to have a query to find the latest date for each training ID and then using todays date and the training interval I can work out if something is overdue.