Query syntax to return a record for EVERY value in another table
Posted on 2011-03-25
I need help with the syntax for a query to return a record for EVERY student for EVERY semester that exists that tells me if they are registered or not.
Table "SEMESTER" contains a list of every semester available for registration.
Table "REGISTRATION" contains a row for each semester a student is registered for. If they are not registered for a given semester, they do not have a row.
My result should be like;
studentid session reg
0001 1 y
0001 2 n
0002 1 y
0002 2 n
0003 1 n
0003 2 n
I figured this should be simple but am struggling to get the null records to pull in. I've tried different joins and sub-queries with no luck. Does Access support "FOR EACH" or "FOR EVERY" syntax?
Thanks for your help.