G
Guest
I am working on a query based on tables from a linked data source (so no
control over how tables are set up). There are 3 tables involved:
REVIEWS: this gives the name and identifying info for a study
REVIEW CRITERIA: this gives the specific questions (up to 50) for the
particular review. Each question has a NAME ("Q1", "Q2", ...) and a TEXT
field that gives the text to be used for the question
REVIEW ANSWERS: this gives the name of the subject and the answers to the
questions; each record contains all 50 answers for each subject of the study;
field names are just Q1, Q2, Q3, ...
The REVIEW CRITERIA and REVIEW ANSWERS are both linked to the REVIEWS table.
What I need is a result set like this:
[REVIEW NAME] [SUBJECT NAME] [QUESTION 1] [QUESTION 1 ANSWER] [QUESTION 2]
[QUESTION 2 ANSWER] ...
The Problem is that the questions are from rows in the REVIEW CRITERIA table
whereas the answers are columns in the REVIEW ANSWERS table.
I don't want to have to link in 50 copies of the REVIEW CRITERIA table, and
I also don't want to have to use DLookups (slow!); also need to minimize hits
on the external database server - any suggestions?
control over how tables are set up). There are 3 tables involved:
REVIEWS: this gives the name and identifying info for a study
REVIEW CRITERIA: this gives the specific questions (up to 50) for the
particular review. Each question has a NAME ("Q1", "Q2", ...) and a TEXT
field that gives the text to be used for the question
REVIEW ANSWERS: this gives the name of the subject and the answers to the
questions; each record contains all 50 answers for each subject of the study;
field names are just Q1, Q2, Q3, ...
The REVIEW CRITERIA and REVIEW ANSWERS are both linked to the REVIEWS table.
What I need is a result set like this:
[REVIEW NAME] [SUBJECT NAME] [QUESTION 1] [QUESTION 1 ANSWER] [QUESTION 2]
[QUESTION 2 ANSWER] ...
The Problem is that the questions are from rows in the REVIEW CRITERIA table
whereas the answers are columns in the REVIEW ANSWERS table.
I don't want to have to link in 50 copies of the REVIEW CRITERIA table, and
I also don't want to have to use DLookups (slow!); also need to minimize hits
on the external database server - any suggestions?