It's not gentlemanly to not like many items. But I need a query that exclude many items (not in) using a list of many items using not like.
| source |
|========|
| danny  |
| ram    |
| nach   |
| boom   |
| trach  |
| banana |
| key_exclude    |
|================|
| danny          |
| ram            |
| like_exclude   |
|================|
| bo             |
| tr             |
The expected results:
| result |
|========|
| banana |
| nach   |
I want to something like that:
select * from source where key not in (select key from key_exclude.key) 
  and key not like in(like_exclude.key)
But it is doesnt work
I can do:
select * from source where key not in (select key from key_exclude.key) 
  and key not like '%bo%' and key not like '%tr%'
The only problem is that the 'like_exclue' may contain hundreds of records.
 
     
     
    