Howdy
I have a select query with the following SQL statement:
Some staff will have completed the chosen training course (CourseTitle) more than once, on different dates. What I would like is for the query to show only the most recent occurence of the course for each member of staff.
I tried adding the word DISTINCT after SELECT but this had no effect.
I would be very grateful if someone could offer a solution to this.
Thanks in advance
TSSTechie
May The Force Be With You
![[yoda] [yoda] [yoda]](/data/assets/smilies/yoda.gif)
I have a select query with the following SQL statement:
Code:
SELECT Staff.[ID Name], Staff.Surname, Staff.Forename, Staff.[Employee Number], Staff.[Current Position], Training.DateCompleted, Training.DayUnknown, Training.MonthUnknown
FROM Staff INNER JOIN Training ON Staff.[ID Name]=Training.IDName
WHERE (((Training.CourseTitle)=Forms!ViewManTrain!ManTrainTitle));
I tried adding the word DISTINCT after SELECT but this had no effect.
I would be very grateful if someone could offer a solution to this.
Thanks in advance
TSSTechie
![[lightsaber] [lightsaber] [lightsaber]](/data/assets/smilies/lightsaber.gif)
![[trooper] [trooper] [trooper]](/data/assets/smilies/trooper.gif)
![[yoda] [yoda] [yoda]](/data/assets/smilies/yoda.gif)