Hi All,
I currently have two datasets. In the first dataset, I have information on country level variables. The countries are coded as string variables and take the following form, for Afghanistan for instance:
----------------------- copy starting from the next line -----------------------
------------------ copy up to and including the previous line ------------------
As can be noticed the string type is a str47. I wish to perform a 1:m merge with using data, with country as the mergng variable. In the using data, the same country, Afghanista, is inputted as:
----------------------- copy starting from the next line -----------------------
------------------ copy up to and including the previous line ------------------
As can be seen, Afghanistan is spelt the exact same way, but is now coded as a str19 variable. As such, when I perform a 1:,m merge using the using data, I get precisely 0 merges. Is there a solution to this problem?
Thanks!
I currently have two datasets. In the first dataset, I have information on country level variables. The countries are coded as string variables and take the following form, for Afghanistan for instance:
----------------------- copy starting from the next line -----------------------
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input str47 country " Afghanistan" end
As can be noticed the string type is a str47. I wish to perform a 1:m merge with using data, with country as the mergng variable. In the using data, the same country, Afghanista, is inputted as:
----------------------- copy starting from the next line -----------------------
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input str19 country "Afghanistan" end
As can be seen, Afghanistan is spelt the exact same way, but is now coded as a str19 variable. As such, when I perform a 1:,m merge using the using data, I get precisely 0 merges. Is there a solution to this problem?
Thanks!
Comment