Scrubbing Obscene Words
sf_jcatMay 27 2008 — edited May 29 2008Hello all,
A client has given me an "obscenity list" (474 records) which they want to be scrubbed against three different name fields in their database (first name, last name, email address). They have a few million names in their list to be scrubbed. I have it stored in a one-column table and am trying to figure out the best way to capture or flag the names. The catch is that if ANY part of the obscenity is in that name they want it flagged. For example, Joe Bass would be flagged because of the a-s-s in the name. We tried to say they'd potentially be scrubbing legit customers, to no avail.
So the question is: Ideas as to the best way to do this? Writing "where first_name like %a-s-s%" 474 times doesn't seem practical, especially since that will need to be executed on three separate fields. Because of the variable nature of the name we can't really use an IN statement either. Just trying to come up with something that won't take all night to run, if possible. Any bright ideas (variations of an INSTR?) would be very much appreciated. Thanks all for your help.
Mike