String filtering SQL Query help
523737Jul 18 2006 — edited Jul 19 2006We have a table set up as follows
| Type | Content | Date |
(date is unimportant for my problem, however)
I have a string which I am checking to see if it contains any of the words in the table with the type 'TEXT' using the following query.
SELECT content FROM content_blocking WHERE type = 'TEXT' and upper(?) like upper('%' || content || '%')
Basically this filter is returning words that it should not because they are contained within legitimate words. Basically I would like to filter all of the words with type 'ACCTEXT', which we have just added, out of the string before I check for the unallowed words of type 'TEXT'
I have been hacking away at getting a query that can do it, but for some reason can't put my finger on exactly how to do it. If anyone could help, it would be greatly appreciated.
Thanks,
Marshall