Does not contain any as criteria

Toto

New member
Local time
Today, 02:26
Joined
May 9, 2014
Messages
7
I have the table tbl1 which contains the phrases and another table tbl2 with the words. I should create the List Box with the phrases from tbl1 which does not contain any word from tbl2.
What would be the simplest solution ?
 
try

SELECT tbl1.phrasefield
FROM Tbl1, Tbl2
WHERE tbl1.phrasefield not like "*" & tbl2.wordfield & "*"
 
It does not work. Tbl1 : "dd aa"; "ee ff"; "bb gg" .Tbl2 : "aa"; "bb" . The results should be "ee ff". Query returns : "dd aa"; "ee ff"; "ee ff";"bb gg"
 
Change CJ_Londons query to Like instead of not like. This will give the phrases that DO match. Then use this as a sub query on the phrases table to exclude the matched list i.e a left join where no match.
 
stopher, you are genius ! How to learn this techniques ?
 

Users who are viewing this thread

Back
Top Bottom