I have three tables, one for employee names, one for test methods, and one showing which employees have been trained on which test method. I would like a query to show all employees and all test methods (even where there has been no entry). The only way I've found to do this is to create one query, then another 'Cartesian' (is that the right word?) query based on the first one. Is there a better way to do this, and is it possible to make the final query updateable (not too important as I was just going to use this for a report)?
Tables:-
tblEmployees (EmployeeNo primary key)
tblTestMethods (TestID primary key)
tblTraining (many-to-one with both the above tables, EmployeeNo and TestID as composite primary key, Trained as a Yes/No field)
Queries:-
Query1 (to show all test methods). SQL-
SELECT tblTests.TestID, tblTraining.EmployeeNo, tblTraining.Trained
FROM tblTests LEFT JOIN tblTraining ON tblTests.TestID = tblTraining.TestID;
Query2 ('Cartesian' to show all test methods for all employees). SQL-
SELECT tblEmployees.EmployeeNo, Query1.TestID, Query1.Trained
FROM tblEmployees, Query1;
Thanks in advance for any help.
Tables:-
tblEmployees (EmployeeNo primary key)
tblTestMethods (TestID primary key)
tblTraining (many-to-one with both the above tables, EmployeeNo and TestID as composite primary key, Trained as a Yes/No field)
Queries:-
Query1 (to show all test methods). SQL-
SELECT tblTests.TestID, tblTraining.EmployeeNo, tblTraining.Trained
FROM tblTests LEFT JOIN tblTraining ON tblTests.TestID = tblTraining.TestID;
Query2 ('Cartesian' to show all test methods for all employees). SQL-
SELECT tblEmployees.EmployeeNo, Query1.TestID, Query1.Trained
FROM tblEmployees, Query1;
Thanks in advance for any help.