• Jeff Moden - Wednesday, June 20, 2018 5:45 AM

    While ranitb's solution will work, you're going to run into problems doing the similarity check based only on the leading word or even a couple of words.  There will also be times where associations will not have any words to match at all.  My recommendation would be that you create a table of actual company names in your database along with a column of aliases that you'd like to match on.  It's not the easy way but it is the right way.

    + 1 googolplex to the googolplex power to that.   It would only be a matter of time before some piece of company name data came along and broke any code you might have that works.   Anything less than tying each and every company name to an "approved" abbreviation is doomed to eventual failure.   Yes, it's gonna be a PITA, but better some small PITA now than some major PITA when existing code breaks in a way that no one notices for a while, and then when it finally actually gets noticed, it's kind of "too late", so to speak.   You do NOT want to be the cause of that.

    Steve (aka sgmunson) 🙂 🙂 🙂
    Rent Servers for Income (picks and shovels strategy)