J
Jason M
I am having a bit of trouble recieving a max date that an event was entered
into a data baase. It only crops up for 4 records out of about 650 and for
those 4 I get duplicate max records (with entirely different dates!).
I am not sure where to proceed from this point. The SQL is posted below, and
if anyone here can help I would be very appreciative.
Thanks in advance,
Jason
SELECT [firstName] & " " & [LastName] AS EmployeeName,
Departments.Department, tblEmployees.Status, tblTrainingTypes.Training,
tblTrainingTypes.Frequency, Max(tblTraining.Date) AS MaxOfDate,
[Date]+[Frequency] AS DueDate, tblTrainingTypes.Initial,
tblTrainingTypes.Annual, tblTrainingTypes.Changes,
tblTrainingTypes.BiAnnually, tblTrainingTypes.Voluntary,
tblTraining.TrainingLocation, tblTraining.Instructor, tblTraining.Notes
FROM tblTrainingTypes INNER JOIN ((Departments INNER JOIN tblEmployees ON
Departments.Department = tblEmployees.Department) INNER JOIN tblTraining ON
tblEmployees.employeeID = tblTraining.EmployeeID) ON
tblTrainingTypes.Training = tblTraining.Training
GROUP BY [firstName] & " " & [LastName], Departments.Department,
tblEmployees.Status, tblTrainingTypes.Training, tblTrainingTypes.Frequency,
[Date]+[Frequency], tblTrainingTypes.Initial, tblTrainingTypes.Annual,
tblTrainingTypes.Changes, tblTrainingTypes.BiAnnually,
tblTrainingTypes.Voluntary, tblTraining.TrainingLocation,
tblTraining.Instructor, tblTraining.Notes
HAVING (((tblEmployees.Status)="Active"));
into a data baase. It only crops up for 4 records out of about 650 and for
those 4 I get duplicate max records (with entirely different dates!).
I am not sure where to proceed from this point. The SQL is posted below, and
if anyone here can help I would be very appreciative.
Thanks in advance,
Jason
SELECT [firstName] & " " & [LastName] AS EmployeeName,
Departments.Department, tblEmployees.Status, tblTrainingTypes.Training,
tblTrainingTypes.Frequency, Max(tblTraining.Date) AS MaxOfDate,
[Date]+[Frequency] AS DueDate, tblTrainingTypes.Initial,
tblTrainingTypes.Annual, tblTrainingTypes.Changes,
tblTrainingTypes.BiAnnually, tblTrainingTypes.Voluntary,
tblTraining.TrainingLocation, tblTraining.Instructor, tblTraining.Notes
FROM tblTrainingTypes INNER JOIN ((Departments INNER JOIN tblEmployees ON
Departments.Department = tblEmployees.Department) INNER JOIN tblTraining ON
tblEmployees.employeeID = tblTraining.EmployeeID) ON
tblTrainingTypes.Training = tblTraining.Training
GROUP BY [firstName] & " " & [LastName], Departments.Department,
tblEmployees.Status, tblTrainingTypes.Training, tblTrainingTypes.Frequency,
[Date]+[Frequency], tblTrainingTypes.Initial, tblTrainingTypes.Annual,
tblTrainingTypes.Changes, tblTrainingTypes.BiAnnually,
tblTrainingTypes.Voluntary, tblTraining.TrainingLocation,
tblTraining.Instructor, tblTraining.Notes
HAVING (((tblEmployees.Status)="Active"));