Without artificial intelligence which is on pair with clear human knowledge which names refer to the same company and which one, even very similar ones, are not, it is simply impossible to do what you want in a plain coding (regardless of programming language).
That is data cleansing exercise and it will always require some manual intervention.
I can only suggest couple of ways:
Use SSIS, there is a Fuzzy Grouping transformation which is designed primary for the data cleansing tasks.
Create a database of company names variations.