Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

How do I get values from one table, only if there is no matching data in a linked table?

Hopefully this makes sense. 

 

I have a three table model, Details, ParentResponses, and StudentResponses. We have asked parents and students what laptop provision they have at home. We ask the same question to both groups as sometimes parents or students are awful at responding to requests for information, so hopefully we can get a better response rate by combining the two groups. 

 

One of the questions is, what laptop provision doyou have at home (called 'provision' in both ParentResponses and StudentResponses). The Details table contains a list of every student in the school, their unique email address and their parent(s) email address. As a student can have multiple parents, there is a one to many relationship between ParentResponses and Details, and a one to many relationship between StudentResponses and Details. 

 

 

 

What I want to do it obtain the student responses to their survey only if the parent has not submitted a response to their survey. Logically something along the lines of: If no parent response in ParentResponses table for this student, check to see if there is a response in the StudentResponses. 

 

Hopefully that all makes sense. How can I do this?

3 Replies