I am trying to check if the values from Table1 exist in Table2.
The thing is that the values are comma separated in Table1
Table 1
| ID | TXT |
|---|---|
| 1 | 129(a),P24 |
| 2 | P112 |
| 3 | P24,XX |
| 4 | 135(a),135(b) |
Table 2
| ID |
|---|
| P24 |
| P112 |
| P129(a) |
| 135(a) |
| 135(b) |
The following only works if the complete cell value exists in both tables:
SELECT Table1.ID, Table1.TXT
FROM Table1 LEFT JOIN Table2 ON Table1.[TXT] = Table2.[ID]
WHERE (((Table2.ID) Is Null));
MY QUESTION IS:
Is there a way to check each comma separated value and return those that do not exists in Table 2.
In above example the value XX should end up in the result.