I have two tables in an Access database. One table is an attendance table and the other is a students table. The attendance table contains dates and student ID's. ID is the primary key in the students table and attendanceDate is the pk in the attendance table. What I want is a query that will return dates and student names so I can display them back to the user. The complication is that the Attendance table contains up to 75 student ID's for each date, so if I do a standard inner join it would have to contain 75 "OR" clauses which is quite cumbersome, and Access will only allow twenty something inner joins anyhow. Is there a way I can do something like this:
SELECT a.attendanceDate FROM (Attendance as a WHERE a.[attendanceDate] BETWEEN #01/01/2020# AND #01/31/2020# INNER JOIN Students AS s ON s.[studentID] = a.[ANY_COLUMN]);
In this example it should return attendance records for the month of January 2020 something like this:
01/02/2020 'Mike Johnson'
01/10/2020 'Mike Johnson', 'Mary Smith'
01/25/2020 'Mary Smith', 'Chad Jones', 'Kyrie Erving'