P
PizzaBoy
Hello. Two tables: Table1, Table2. Table1 has a primary key named IDFIELD,
no duplicates. Table2 also has a field named IDFIELD with many duplicates.
Table 2 has a field name called TYPE with has one of the following items "A,
B, C, or D". The two tables are linked ONE TO MANY by the IDFIELD field.
Using a query (I don't know any scripting), I would like to create a query
that returns records of table1 where none of the records matched by IDFIELD
in table2 have the value of "B" or "D" in the TYPE field.
Example: The query should return the records for "3" and "5" from table1
because none of the records matched by the IDFIELD in Table2 have "B" or "D"
in the TYPE field. I have tried a couple of join types and query variations
and only succeeded in results which would include all 4 records since at
least one matched record in table2 linked by IDFIELD in table1 doesn't have
"B" or "D" in the TYPE field.
Table1
IDFIELD
2
3
4
Table 2
IDFIELD TYPE
2 A
2 B
2 C
2 D
3 A
3 A
4 C
4 D
4 C
5 C
5 C
5 A
I hope this makes sense. Thank you for any help.
no duplicates. Table2 also has a field named IDFIELD with many duplicates.
Table 2 has a field name called TYPE with has one of the following items "A,
B, C, or D". The two tables are linked ONE TO MANY by the IDFIELD field.
Using a query (I don't know any scripting), I would like to create a query
that returns records of table1 where none of the records matched by IDFIELD
in table2 have the value of "B" or "D" in the TYPE field.
Example: The query should return the records for "3" and "5" from table1
because none of the records matched by the IDFIELD in Table2 have "B" or "D"
in the TYPE field. I have tried a couple of join types and query variations
and only succeeded in results which would include all 4 records since at
least one matched record in table2 linked by IDFIELD in table1 doesn't have
"B" or "D" in the TYPE field.
Table1
IDFIELD
2
3
4
Table 2
IDFIELD TYPE
2 A
2 B
2 C
2 D
3 A
3 A
4 C
4 D
4 C
5 C
5 C
5 A
I hope this makes sense. Thank you for any help.