"Ben Marchbanks" <b...@alqemy.com> wrote in
message news:49615144.7090...@alqemy.com
> SELECT * FROM `pagesText` WHERE  pageText LIKE ( "%muffler%" ,
> "%clamp%" )
>
> Is there a nice way to write a query using parenthetical LIKE ?

SELECT * FROM pagesText
WHERE pageText LIKE '%muffler%'  OR pageText LIKE '%clamp%';

If you have a long list of patterns you want to compare against, insert 
them all into a temp table then do something like this:

SELECT * FROM pagesText WHERE EXISTS (
    select 1 from patterns where pageText LIKE '%' || pattern || '%');

Igor Tandetnik 



_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to