select bioRecord_base.* 
into bioRecord_base
from syn2_world.dbo.bioRecord_base
left join syn_raw.dbo.corm_resource on resKey = bioRecordResourceKey
where european_data_only = 1     /* resources with european_data_only */
   or bioRecordCountryCode in
      ('AL', 'AD', 'AT', 'BY', 'BE', 'BA', 'BG', 'HR', 'CY', 'CZ', 'DK', 'EE', 'FI', 'FR', 'DE',
	   'GI', 'GR', 'HU', 'IS', 'IE', 'IL', 'IT', 'LV', 'LI', 'LT', 'LU', 'MK', 'MT', 'MD', 'MC',
	   'NL', 'NO', 'PL', 'PT', 'RO', 'RU', 'CS', 'SK', 'SI', 'ES', 'SE', 'CH', 'UA', 'GB', 'VA');
	  
select bioRecord_ext.*
into bioRecord_ext
from bioRecord_base
join syn2_world.dbo.bioRecord_ext on brKey = bioRecordKey;