Good Morning, I have some trouble in using the merge command in order to create a panel data on banks.
My master dataset is already a panel one. I have something like this

Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input str93 Entityname int(id year) str2 ISO
"BANCO SANTANDER SA"                 1 2004 "ES"
"BANCO SANTANDER SA"                 1 2005 "ES"
"BANCO SANTANDER SA"                 1 2006 "ES"
"BANCO SANTANDER SA"                 1 2007 "ES"
"BANCO SANTANDER SA"                 1 2008 "ES"
"BANCO SANTANDER SA"                 1 2009 "ES"
"BANCO SANTANDER SA"                 1 2010 "ES"
"BANCO SANTANDER SA"                 1 2011 "ES"
"BANCO SANTANDER SA"                 1 2012 "ES"
"BANCO SANTANDER SA"                 1 2013 "ES"
"BANCO SANTANDER SA"                 1 2014 "ES"
"BANCO SANTANDER SA"                 1 2015 "ES"
I avoid to report my variables for seek of brevity.

Note that for THE SAME ISO I have different Entityname and different id, eg another spanish bank will have its own Entityname, id=2, and the same ISO code.

I need to merge this dataset with another one, which looks like this.


Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input str2 ISO double gross_cap_form int year

"ES" 24.061026887504784 2004
"ES"  23.82524563708602 2005
"ES"  23.61032758584961 2006
"ES" 24.584304902242945 2007
"ES" 24.467460740570484 2008
"ES"  22.77532093879262 2009
"ES" 22.607847118507326 2010
"ES" 24.140474472755923 2011
"ES" 23.977106887164798 2012
"ES"  23.72339000130283 2013
"ES" 23.531542785421422 2014
"ES" 23.805276447632334 2015
Here, on the other hand, I have just one "series" of ISO code.

What I need is that, for example, ALL the Spanish Bank in my dataset are merged with the corresponding gross_cap_form
I have tried with a simple merge m:1, sorting by ISO both dataset, but the results are not satisfactory.

Can somebody help me?