Hi all,
I want to merge two tables which origin from two different databases. Therefore, the spelling of the companies which are used as the identifier in the variable "CompanyYear" is not equal.
E.g. "3D Systems Corporation" is spelled "3D SYSTEMS CORP." and "3D SYSTEMS CORPORATION" in Table 2 while in Table 1 in is spelled "3D SYSTEMS CORP" (note the dot after "CORP" makes a difference).
The problem is now that when I try to merge the two tables, the number of matched results is very low given the different spelling, although in fact both tables refer to the same company.
Is there a possibility to solve this problem by e.g. making the comparison criteria less rigorous? I know there is a comparable function in Excel with the VLOOKUP function where you can select "true" or "false" to make the comparison criteria less rigorous.
Table 1 (Master table)
Table 2
Thanks for your comments.
Best
Matthias
I want to merge two tables which origin from two different databases. Therefore, the spelling of the companies which are used as the identifier in the variable "CompanyYear" is not equal.
E.g. "3D Systems Corporation" is spelled "3D SYSTEMS CORP." and "3D SYSTEMS CORPORATION" in Table 2 while in Table 1 in is spelled "3D SYSTEMS CORP" (note the dot after "CORP" makes a difference).
The problem is now that when I try to merge the two tables, the number of matched results is very low given the different spelling, although in fact both tables refer to the same company.
Is there a possibility to solve this problem by e.g. making the comparison criteria less rigorous? I know there is a comparable function in Excel with the VLOOKUP function where you can select "true" or "false" to make the comparison criteria less rigorous.
Table 1 (Master table)
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input str53 CompanyYear "3COM CORP2000" "3COM CORP2001" "3COM CORP2002" "3COM CORP2003" "3COM CORP2004" "3COM CORP2005" "3COM CORP2006" "3COM CORP2007" "3D SYSTEMS CORP2007" "3D SYSTEMS CORP2008" "3D SYSTEMS CORP2009" "3D SYSTEMS CORP2010" "3D SYSTEMS CORP2011" "3D SYSTEMS CORP2012" "3D SYSTEMS CORP2013" "3D SYSTEMS CORP2014" "3D SYSTEMS CORP2015" "3D SYSTEMS CORP2016" "3M CO2003" "3M CO2004" end
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input str53 CompanyYear "3COM CORP.2007" "3COM CORP.2008" "3COM CORP.2009" "3D SYSTEMS CORP.2018" "3D SYSTEMS CORPORATION2011" "3D SYSTEMS CORPORATION2012" "3D SYSTEMS CORPORATION2013" "3D SYSTEMS CORPORATION2014" "3D SYSTEMS CORPORATION2015" "3D SYSTEMS CORPORATION2016" "3D SYSTEMS CORPORATION2017" "3D SYSTEMS CORPORATION2019" "3M CO2007" "3M CO2008" "3M CO2009" "3M CO.2018" "3M COMPANY2010" "3M COMPANY2011" "3M COMPANY2012" "3M COMPANY2013" end
Best
Matthias
Comment