I was looking for questions, and there are similar questions, but not a solution that I think I can use. This question looks like a fuzzy match ... sorta. I need help comparing two tables. One table is the company’s look-up table, and the other is the table that receives raw company data daily. The lookup table is clean and has a company identifier associated with each individual company. The daily data that is imported does not have a company identifier. What I'm trying to do is to have a daily link to the Company Checklist data in the company name and update the Company Table company_state column based on company_name. Unfortunately, the daily data row for company_name is not always the same every day. There may be different characters (az, 0-9, +, - ,.) And spaces in front or after the actual name of the company with different durations per day, so I do not believe that I can use charindex to clean it.
Company Reference Table
company_id company_name company_state
1 Awesome Inc NY
2 Excel-guru AL
3 Clean All MI
Company table
company_name company_state
abc123 Awesome Inc NULL
Excel gur xyz-987 NULL
Clean All Cleanall NULL
I want this done. Varieties like a fuzzy coincidence.
Company table
company_name company_state
abc123 Awesome Inc NY
Excel gur xyz-987 AL
Clean All Cleanall MI
Any help is greatly appreciated. Thank.
source
share