Table_1 contains name column and yes/no column
Table_2 contains name column and number column
Typical rows from Table_1:
John, yes
Bill, no
Pete, yes
Typical rows from Table_2:
John, 2
John, 435
John, 34
Bill, 234
Bill, 19
Here is my question - I want to run a query that says if Table_1 yes/no column = no, then ignore that person. And, if Table_1 contains yes, but the person is not found in Table_2, then ignore that person. Else return people in a SELECT query with information from other columns in both Table_1 AND Table_2.
In other words, using the above example. Bill would be ignored because he is set to "no" in Table_1 and Pete is also ignored, because dispite being set to "yes" in Table_1, he is does not have any values in Table_2.
Clear as mud? 🙂 I hope someone can give me some hints as to how to do this query. I used to have it easy as all the data was in a single table, but Piranha pointed out it broke normalisation rules. Now my tables are up to scratch but I have no idea how to write this query 🙁
Many thanks