Do Not Call Scrubbing

We entered the world of telemarketing recently which opened up some interested issues with Do Not Call management in our databases.  I took a look at some outsourced solutions but in the end I decided to throw together a very basic SQL Script to handle this scrubbing.  Its a pretty basic script but it did the trick.

Additionally, I placed a last scrub date in our CRM that will prevent any telemarketing activities if we exceed the 30 day mark, as well as an ability to add internal numbers to the Do Not Call Database, and a function to run the DNC script whenever new leads or contacts are updated.

One of my issues is my phone numbers are stored as 10 digits and the DNC database I created has a column for area code and another column for phone.  I used the Right and Left functions to pull out the two parts.  Once a Do Not Call Number is identified it is replaced with ‘SCRUBED DNC’.  I chose to write over the numbers, you may wish to keep them and flag the record in another way.

CODE:

UPDATE  leadsDB

SET PHONE = ‘SCRUBBED DNC’

where right(phone,7) IN

(  select number from DNCNew

where  AreaCode = left(phone,3)

Comments are closed.