Я могу отклонить строки в запросе, где элемент отсутствует в таблице поиска, если точное совпадение :
select * from mytable where (item not in (select keyword from lookup_table))
Но теперь мне нужно отклонить строки, если item содержит любое из ключевых слов в таблице поиска
Псевдокод:
select *
from mytable
as long as any part of the item field does not contain any keyword from the lookup table
keywords in lookup table: 'something', 'test', 'something else'
item: 'this is a test' would be rejected since it contains 'test'
item: 'this is something else' would be rejected since it contains 'something'
(it would also have been rejected since it contains 'something else')
item: 'this is OK' would be included in the select since it contains none of the keywords
Спасибо!