mardi 21 avril 2015

SQLite, Removing dirty talk! select 'like' from another table

I'm trying to remove "bad words" from a table using a list of offensive words from another table, but the offensive words are often in lemma form. Thus, I can't always do a exact match. I need to use a LIKE quantifier, for example WHERE text LIKE '%badword%'

Is there a way for me to try to select all the rows that contains a word from another table, but by specifically using the LIKE clause.

I'll give an example of what I was trying to do. This didn't work, but should give you an idea of what I'm trying to do:

SELECT *
FROM entry 
WHERE headword LIKE IN
( SELECT word
FROM sies )

Now I know that the LIKE doesn't fit into this query, but I'm trying to get something to this effect working.

Aucun commentaire:

Enregistrer un commentaire