C
Chris Perry
Hello all,
I want to select certain child records from a table based on the values of
other unrelated child records.
For the select Im using three tables from a Questionnaire database.
Respondant, Response, and txtOption.
Each respondant, has multiple responses and each response can consist of one
or more txtOption.
I need to make a summary of certain responses for the Questionnaire, so for
example to find out what the answers where to the "size of business"
question I simply write a query like so :
SELECT txtOption.OptionValue
FROM (Respondant INNER JOIN Response ON Respondant.pkRespondantId =
Response.fkRespondantId) INNER JOIN txtOption ON
Response.pkResponseId = txtOption.fkResponseId
WHERE (Response.fkQuestionId=6);
But what I really need is to be able to select a subset of the responses
based on the OTHER responses to different questions, for example get the
size of business for those respondants thats are part of a certain industry
sector. Industry sector is one of the responses whose value is found in a
txtOption if you see what I mean.
Sorry if I'm confusing but as you can probably tell its a quite difficult
problem. Any help gratefully received.
Thank you.
Chris.
I want to select certain child records from a table based on the values of
other unrelated child records.
For the select Im using three tables from a Questionnaire database.
Respondant, Response, and txtOption.
Each respondant, has multiple responses and each response can consist of one
or more txtOption.
I need to make a summary of certain responses for the Questionnaire, so for
example to find out what the answers where to the "size of business"
question I simply write a query like so :
SELECT txtOption.OptionValue
FROM (Respondant INNER JOIN Response ON Respondant.pkRespondantId =
Response.fkRespondantId) INNER JOIN txtOption ON
Response.pkResponseId = txtOption.fkResponseId
WHERE (Response.fkQuestionId=6);
But what I really need is to be able to select a subset of the responses
based on the OTHER responses to different questions, for example get the
size of business for those respondants thats are part of a certain industry
sector. Industry sector is one of the responses whose value is found in a
txtOption if you see what I mean.
Sorry if I'm confusing but as you can probably tell its a quite difficult
problem. Any help gratefully received.
Thank you.
Chris.