Hi,
I'm looking for help with an Access query to return a data contained in one table from another table where it could appear in two columns but with duplicates removed.
Check_tbl
ID | C |
---|---|
1 | 123 |
2 | 456 |
3 | 789 |
4 | FDFHSFHGF |
5 | SDFGDGFDS |
6 | ABC |
source_tbl
ID | A | B | F |
---|---|---|---|
1 | 123 | ABC | 156.pdf |
2 | 456 | 440.pdf | |
3 | DEF | 149.pdf | |
4 | 789 | GHI | 160.pdf |
5 | 111 | 178.pdf | |
6 | JKL | 506.pdf | |
7 | 156.pdf |
I need the query to return every entry in check_tbl.C which appears in source_tbl.A and source_tbl.B as well as source_tbl.F but I need duplicates removed where check_tbl.C appears in both source_tbl.A AND source_tbl.B (ie only return one of the two results)
Returned result should look like this:
results
C | F |
---|---|
ABC | 156.pdf |
456 | 440.pdf |
789 | 160.pdf |
since value 123 and ABC from check_tbl.C appear in source_tbl.A and source_tbl.B respectively, only one is returned.
If anyone can assist with this I would be grateful.