How can I pull the records from the first table (***Table\_A***) which has an **Attr** column having embedded **CODE** values those contain *at least one uncommon* **CODE** value whenever compared to the second table (***Table\_B***: *CODE* & *DESCR* cols.) so that I get table\_C as the result? This is what I have so far:

```sql
Select * From Table_A
Where Attr like '%CODE%' AND
    not exist (select * from Table_B
               where Table_A.Attr LIKE '%'||Table_B.CODE||'%')

```

table A

| ID | Attr |
| --- | --- |
| 1 | CODE = A111 |
| 2 | CODE = 'A111, B222, C333, D444' |
| 3 | CODE = 'D444', 'E555', 'F666' |
| 4 | CODE = 'G777', 'B222' |
| 5 | ITEM = 'AFRD' AND CODE = 'C333' |
| 6 | ITEM = BYNM |

table\_B

| CODE | DESCR |
| --- | --- |
| A111 | djiefljfe |
| D444 | qrrascjg |
| E555 | wpofler |
| F666 | nfosmwfa |
| G777 | losk |

table\_C

| ID | Attr |
| --- | --- |
| 2 | CODE = 'A111, B222, C333, D444' |
| 4 | CODE = 'G777', 'B222' |
| 5 | ITEM = 'AFRD' AND CODE = 'C333' |