G
ghostman via AccessMonster.com
I have this SQL that display training NO SHOWs.
SELECT [Training Records].TraineeID, Count([Training Records].NoShow) AS
CountOfNoShow, [Training Sessions].TSID, [Training Sessions].ModuleName,
[Training Sessions].SessionDate
FROM [Training Sessions] INNER JOIN [Training Records] ON [Training Sessions].
TSID = [Training Records].TSID
GROUP BY [Training Records].TraineeID, [Training Sessions].TSID, [Training
Sessions].ModuleName, [Training Sessions].SessionDate
HAVING ((([Training Records].TraineeID) In (SELECT TraineeID FROM [Training
Records] WHERE NoShow = True GROUP BY
TraineeID HAVING COUNT (*)> 2)) AND ((Count([Training Records].NoShow))=True))
;
The query should only display trainees with more than 3 NO SHOWs: but as you
can see on the below table, it is also showing less than 3 NO SHOWs...
TraineeID TSID ModuleName SessionDate CountOfNoShow
8765124 101-LVR-16-07 Janitorial 101 7/16/2009 1
8765124 201-MRA-05-08 Attendant 201 8/5/2009 3
8765124 401-MAS-18-08 Life Guards 401 8/18/2009 3
how can i make it display trainees with 3 or more NO SHOWS???
SELECT [Training Records].TraineeID, Count([Training Records].NoShow) AS
CountOfNoShow, [Training Sessions].TSID, [Training Sessions].ModuleName,
[Training Sessions].SessionDate
FROM [Training Sessions] INNER JOIN [Training Records] ON [Training Sessions].
TSID = [Training Records].TSID
GROUP BY [Training Records].TraineeID, [Training Sessions].TSID, [Training
Sessions].ModuleName, [Training Sessions].SessionDate
HAVING ((([Training Records].TraineeID) In (SELECT TraineeID FROM [Training
Records] WHERE NoShow = True GROUP BY
TraineeID HAVING COUNT (*)> 2)) AND ((Count([Training Records].NoShow))=True))
;
The query should only display trainees with more than 3 NO SHOWs: but as you
can see on the below table, it is also showing less than 3 NO SHOWs...
TraineeID TSID ModuleName SessionDate CountOfNoShow
8765124 101-LVR-16-07 Janitorial 101 7/16/2009 1
8765124 201-MRA-05-08 Attendant 201 8/5/2009 3
8765124 401-MAS-18-08 Life Guards 401 8/18/2009 3
how can i make it display trainees with 3 or more NO SHOWS???