On Tue, 26 Mar 2013 17:14:57 +0100
Gert Van Assche <[email protected]> wrote:

> SELECT [Sentences] FROM [T1] WHERE [Sentences] LIKE '%GM%';
> 
> What I would like to do is look for all terms that appear in the
> Terms table. Something like this (but of course this does not work):
> SELECT [Sentences] FROM [T1] WHERE [Sentences] LIKE (SELECT Terms
> FROM T2);

SELECT Sentences FROM T1 
WHERE EXISTS (
        select 1 from T2
        where T1.Sentences like '%' || Terms || '%'
);

--jkl
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to