J
Jeff
Hi everyone,
I have a table that store the patient's personal data like name, address
etc., a table that store 4 tests result of the patient. These 2 tables are
one to one relation, because each patient has only on record of test results.
The test result columns store 1 or 2 instead of pass or fail. Therefore, I
need another table, tbMark, to store 1, 2 as ID and pass, fail as Text. How
to build a query for the Report, so that pass or fail are printed out in
stead of 1 or 2? My code below doesn't work. Thank you.
SELECT tbResult.RResult1, *
FROM (tbPatient INNER JOIN tbResult ON tbPatient.ID = tbResult.MasterID)
INNER JOIN tbMark ON (tbResult.LResult1 = tbMark.ID) AND (tbResult.RResult1 =
tbMark.ID) AND (tbResult.LResult2 = tbMark.ID) AND (tbResult.RResult2 =
tbMark.ID)
WHERE (((tbPatient.ChartNo)=23622));
I have a table that store the patient's personal data like name, address
etc., a table that store 4 tests result of the patient. These 2 tables are
one to one relation, because each patient has only on record of test results.
The test result columns store 1 or 2 instead of pass or fail. Therefore, I
need another table, tbMark, to store 1, 2 as ID and pass, fail as Text. How
to build a query for the Report, so that pass or fail are printed out in
stead of 1 or 2? My code below doesn't work. Thank you.
SELECT tbResult.RResult1, *
FROM (tbPatient INNER JOIN tbResult ON tbPatient.ID = tbResult.MasterID)
INNER JOIN tbMark ON (tbResult.LResult1 = tbMark.ID) AND (tbResult.RResult1 =
tbMark.ID) AND (tbResult.LResult2 = tbMark.ID) AND (tbResult.RResult2 =
tbMark.ID)
WHERE (((tbPatient.ChartNo)=23622));