I have a table with one word each row and a table with some text in a row. I need to select from the second table only those rows that does not contain words from the first table.
For example:
Table with constratint words
constraint_word |
---|
example |
apple |
orange |
mushroom |
car |
qwerty |
Table with text
text |
---|
word1. apple; word3, example |
word1, apple, word2. car |
word1 word2 orange word3 |
mushroomword1 word2 word3 |
word1 car |
qwerty |
Nothing should be selected in this case, because every row in the second table contains words from the first table.
I only have an idea to use CROSS JOIN
to achive this
SELECT DISTINCT text FROM text_table CROSS JOIN words_table
WHERE CONTAINS(text, constraint_word ) = 0
Is there a way to do it without using CROSS JOIN
?