SET NOCOUNT ON

DECLARE @CountryName VARCHAR(30)
DECLARE @ISO_3166_A2 CHAR(2)
DECLARE @ISO_3166_A3 CHAR(3)

CREATE TABLE #isoCode
(
  Country VARCHAR(100),
  ISO2 CHAR(2),
  ISO3 CHAR(3)
)

INSERT INTO #isoCode VALUES ('Cambodia','AF','AFG')
INSERT INTO #isoCode VALUES ('Albania','AL','ALB')
INSERT INTO #isoCode VALUES ('Algeria','DZ','DZA')
INSERT INTO #isoCode VALUES ('Andorra','AD','AND')
INSERT INTO #isoCode VALUES ('Angola','AO','AGO')
INSERT INTO #isoCode VALUES ('Antigua and Barbuda','AG','ATG')
INSERT INTO #isoCode VALUES ('Argentina','AR','ARG')
INSERT INTO #isoCode VALUES ('Armenia','AM','ARM')
INSERT INTO #isoCode VALUES ('Australia','AU','AUS')
INSERT INTO #isoCode VALUES ('Austria','AT','AUT')
INSERT INTO #isoCode VALUES ('Azerbaijan','AZ','AZE')
INSERT INTO #isoCode VALUES ('Bahamas, The','BS','BHS')
INSERT INTO #isoCode VALUES ('Bahrain','BH','BHR')
INSERT INTO #isoCode VALUES ('Bangladesh','BD','BGD')
INSERT INTO #isoCode VALUES ('Barbados','BB','BRB')
INSERT INTO #isoCode VALUES ('Belarus','BY','BLR')
INSERT INTO #isoCode VALUES ('Belgium','BE','BEL')
INSERT INTO #isoCode VALUES ('Belize','BZ','BLZ')
INSERT INTO #isoCode VALUES ('Benin','BJ','BEN')
INSERT INTO #isoCode VALUES ('Bhutan','BT','BTN')
INSERT INTO #isoCode VALUES ('Bolivia','BO','BOL')
INSERT INTO #isoCode VALUES ('Bosnia and Herzegovina','BA','BIH')
INSERT INTO #isoCode VALUES ('Botswana','BW','BWA')
INSERT INTO #isoCode VALUES ('Brazil','BR','BRA')
INSERT INTO #isoCode VALUES ('Brunei','BN','BRN')
INSERT INTO #isoCode VALUES ('Bulgaria','BG','BGR')
INSERT INTO #isoCode VALUES ('Burkina Faso','BF','BFA')
INSERT INTO #isoCode VALUES ('Burundi','BI','BDI')
INSERT INTO #isoCode VALUES ('Cambodia','KH','KHM')
INSERT INTO #isoCode VALUES ('Cameroon','CM','CMR')
INSERT INTO #isoCode VALUES ('Canada','CA','CAN')
INSERT INTO #isoCode VALUES ('Cape Verde','CV','CPV')
INSERT INTO #isoCode VALUES ('Central African Republic','CF','CAF')
INSERT INTO #isoCode VALUES ('Chad','TD','TCD')
INSERT INTO #isoCode VALUES ('Chile','CL','CHL')
INSERT INTO #isoCode VALUES ('China, People''s Republic of','CN','CHN')
INSERT INTO #isoCode VALUES ('Colombia','CO','COL')
INSERT INTO #isoCode VALUES ('Comoros','KM','COM')
INSERT INTO #isoCode VALUES ('Congo, (Congo ? Kinshasa)','CD','COD')
INSERT INTO #isoCode VALUES ('Congo, (Congo ? Brazzaville)','CG','COG')
INSERT INTO #isoCode VALUES ('Costa Rica','CR','CRI')
INSERT INTO #isoCode VALUES ('Cote d''Ivoire (Ivory Coast)','CI','CIV')
INSERT INTO #isoCode VALUES ('Croatia','HR','HRV')
INSERT INTO #isoCode VALUES ('Cuba','CU','CUB')
INSERT INTO #isoCode VALUES ('Cyprus','CY','CYP')
INSERT INTO #isoCode VALUES ('Czech Republic','CZ','CZE')
INSERT INTO #isoCode VALUES ('Denmark','DK','DNK')
INSERT INTO #isoCode VALUES ('Djibouti','DJ','DJI')
INSERT INTO #isoCode VALUES ('Dominica','DM','DMA')
INSERT INTO #isoCode VALUES ('Dominican Republic','DO','DOM')
INSERT INTO #isoCode VALUES ('Ecuador','EC','ECU')
INSERT INTO #isoCode VALUES ('Egypt','EG','EGY')
INSERT INTO #isoCode VALUES ('El Salvador','SV','SLV')
INSERT INTO #isoCode VALUES ('Equatorial Guinea','GQ','GNQ')
INSERT INTO #isoCode VALUES ('Eritrea','ER','ERI')
INSERT INTO #isoCode VALUES ('Estonia','EE','EST')
INSERT INTO #isoCode VALUES ('Ethiopia','ET','ETH')
INSERT INTO #isoCode VALUES ('Fiji','FJ','FJI')
INSERT INTO #isoCode VALUES ('Finland','FI','FIN')
INSERT INTO #isoCode VALUES ('France','FR','FRA')
INSERT INTO #isoCode VALUES ('Gabon','GA','GAB')
INSERT INTO #isoCode VALUES ('Gambia, The','GM','GMB')
INSERT INTO #isoCode VALUES ('Georgia','GE','GEO')
INSERT INTO #isoCode VALUES ('Germany','DE','DEU')
INSERT INTO #isoCode VALUES ('Ghana','GH','GHA')
INSERT INTO #isoCode VALUES ('Greece','GR','GRC')
INSERT INTO #isoCode VALUES ('Grenada','GD','GRD')
INSERT INTO #isoCode VALUES ('Guatemala','GT','GTM')
INSERT INTO #isoCode VALUES ('Guinea','GN','GIN')
INSERT INTO #isoCode VALUES ('Guinea-Bissau','GW','GNB')
INSERT INTO #isoCode VALUES ('Guyana','GY','GUY')
INSERT INTO #isoCode VALUES ('Haiti','HT','HTI')
INSERT INTO #isoCode VALUES ('Honduras','HN','HND')
INSERT INTO #isoCode VALUES ('Hungary','HU','HUN')
INSERT INTO #isoCode VALUES ('Iceland','IS','ISL')
INSERT INTO #isoCode VALUES ('India','IN','IND')
INSERT INTO #isoCode VALUES ('Indonesia','ID','IDN')
INSERT INTO #isoCode VALUES ('Iran','IR','IRN')
INSERT INTO #isoCode VALUES ('Iraq','IQ','IRQ')
INSERT INTO #isoCode VALUES ('Ireland','IE','IRL')
INSERT INTO #isoCode VALUES ('Israel','IL','ISR')
INSERT INTO #isoCode VALUES ('Italy','IT','ITA')
INSERT INTO #isoCode VALUES ('Jamaica','JM','JAM')
INSERT INTO #isoCode VALUES ('Japan','JP','JPN')
INSERT INTO #isoCode VALUES ('Jordan','JO','JOR')
INSERT INTO #isoCode VALUES ('Kazakhstan','KZ','KAZ')
INSERT INTO #isoCode VALUES ('Kenya','KE','KEN')
INSERT INTO #isoCode VALUES ('Kiribati','KI','KIR')
INSERT INTO #isoCode VALUES ('Korea, North','KP','PRK')
INSERT INTO #isoCode VALUES ('Korea, South','KR','KOR')
INSERT INTO #isoCode VALUES ('Kuwait','KW','KWT')
INSERT INTO #isoCode VALUES ('Kyrgyzstan','KG','KGZ')
INSERT INTO #isoCode VALUES ('Laos','LA','LAO')
INSERT INTO #isoCode VALUES ('Latvia','LV','LVA')
INSERT INTO #isoCode VALUES ('Lebanon','LB','LBN')
INSERT INTO #isoCode VALUES ('Lesotho','LS','LSO')
INSERT INTO #isoCode VALUES ('Liberia','LR','LBR')
INSERT INTO #isoCode VALUES ('Libya','LY','LBY')
INSERT INTO #isoCode VALUES ('Liechtenstein','LI','LIE')
INSERT INTO #isoCode VALUES ('Lithuania','LT','LTU')
INSERT INTO #isoCode VALUES ('Luxembourg','LU','LUX')
INSERT INTO #isoCode VALUES ('Macedonia','MK','MKD')
INSERT INTO #isoCode VALUES ('Madagascar','MG','MDG')
INSERT INTO #isoCode VALUES ('Malawi','MW','MWI')
INSERT INTO #isoCode VALUES ('Malaysia','MY','MYS')
INSERT INTO #isoCode VALUES ('Maldives','MV','MDV')
INSERT INTO #isoCode VALUES ('Mali','ML','MLI')
INSERT INTO #isoCode VALUES ('Malta','MT','MLT')
INSERT INTO #isoCode VALUES ('Marshall Islands','MH','MHL')
INSERT INTO #isoCode VALUES ('Mauritania','MR','MRT')
INSERT INTO #isoCode VALUES ('Mauritius','MU','MUS')
INSERT INTO #isoCode VALUES ('Mexico','MX','MEX')
INSERT INTO #isoCode VALUES ('Micronesia','FM','FSM')
INSERT INTO #isoCode VALUES ('Moldova','MD','MDA')
INSERT INTO #isoCode VALUES ('Monaco','MC','MCO')
INSERT INTO #isoCode VALUES ('Mongolia','MN','MNG')
INSERT INTO #isoCode VALUES ('Montenegro','ME','MNE')
INSERT INTO #isoCode VALUES ('Morocco','MA','MAR')
INSERT INTO #isoCode VALUES ('Mozambique','MZ','MOZ')
INSERT INTO #isoCode VALUES ('Myanmar (Burma)','MM','MMR')
INSERT INTO #isoCode VALUES ('Namibia','NA','NAM')
INSERT INTO #isoCode VALUES ('Nauru','NR','NRU')
INSERT INTO #isoCode VALUES ('Nepal','NP','NPL')
INSERT INTO #isoCode VALUES ('Netherlands','NL','NLD')
INSERT INTO #isoCode VALUES ('New Zealand','NZ','NZL')
INSERT INTO #isoCode VALUES ('Nicaragua','NI','NIC')
INSERT INTO #isoCode VALUES ('Niger','NE','NER')
INSERT INTO #isoCode VALUES ('Nigeria','NG','NGA')
INSERT INTO #isoCode VALUES ('Norway','NO','NOR')
INSERT INTO #isoCode VALUES ('Oman','OM','OMN')
INSERT INTO #isoCode VALUES ('Pakistan','PK','PAK')
INSERT INTO #isoCode VALUES ('Palau','PW','PLW')
INSERT INTO #isoCode VALUES ('Panama','PA','PAN')
INSERT INTO #isoCode VALUES ('Papua New Guinea','PG','PNG')
INSERT INTO #isoCode VALUES ('Paraguay','PY','PRY')
INSERT INTO #isoCode VALUES ('Peru','PE','PER')
INSERT INTO #isoCode VALUES ('Philippines','PH','PHL')
INSERT INTO #isoCode VALUES ('Poland','PL','POL')
INSERT INTO #isoCode VALUES ('Portugal','PT','PRT')
INSERT INTO #isoCode VALUES ('Qatar','QA','QAT')
INSERT INTO #isoCode VALUES ('Romania','RO','ROU')
INSERT INTO #isoCode VALUES ('Russia','RU','RUS')
INSERT INTO #isoCode VALUES ('Rwanda','RW','RWA')
INSERT INTO #isoCode VALUES ('Saint Kitts and Nevis','KN','KNA')
INSERT INTO #isoCode VALUES ('Saint Lucia','LC','LCA')
INSERT INTO #isoCode VALUES ('Saint Vincent and the Grenadines','VC','VCT')
INSERT INTO #isoCode VALUES ('Samoa','WS','WSM')
INSERT INTO #isoCode VALUES ('San Marino','SM','SMR')
INSERT INTO #isoCode VALUES ('Sao Tome and Principe','ST','STP')
INSERT INTO #isoCode VALUES ('Saudi Arabia','SA','SAU')
INSERT INTO #isoCode VALUES ('Senegal','SN','SEN')
INSERT INTO #isoCode VALUES ('Serbia','RS','SRB')
INSERT INTO #isoCode VALUES ('Seychelles','SC','SYC')
INSERT INTO #isoCode VALUES ('Sierra Leone','SL','SLE')
INSERT INTO #isoCode VALUES ('Singapore','SG','SGP')
INSERT INTO #isoCode VALUES ('Slovakia','SK','SVK')
INSERT INTO #isoCode VALUES ('Slovenia','SI','SVN')
INSERT INTO #isoCode VALUES ('Solomon Islands','SB','SLB')
INSERT INTO #isoCode VALUES ('Somalia','SO','SOM')
INSERT INTO #isoCode VALUES ('South Africa','ZA','ZAF')
INSERT INTO #isoCode VALUES ('Spain','ES','ESP')
INSERT INTO #isoCode VALUES ('Sri Lanka','LK','LKA')
INSERT INTO #isoCode VALUES ('Sudan','SD','SDN')
INSERT INTO #isoCode VALUES ('Suriname','SR','SUR')
INSERT INTO #isoCode VALUES ('Swaziland','SZ','SWZ')
INSERT INTO #isoCode VALUES ('Sweden','SE','SWE')
INSERT INTO #isoCode VALUES ('Switzerland','CH','CHE')
INSERT INTO #isoCode VALUES ('Syria','SY','SYR')
INSERT INTO #isoCode VALUES ('Tajikistan','TJ','TJK')
INSERT INTO #isoCode VALUES ('Tanzania','TZ','TZA')
INSERT INTO #isoCode VALUES ('Thailand','TH','THA')
INSERT INTO #isoCode VALUES ('Timor-Leste (East Timor)','TL','TLS')
INSERT INTO #isoCode VALUES ('Togo','TG','TGO')
INSERT INTO #isoCode VALUES ('Tonga','TO','TON')
INSERT INTO #isoCode VALUES ('Trinidad and Tobago','TT','TTO')
INSERT INTO #isoCode VALUES ('Tunisia','TN','TUN')
INSERT INTO #isoCode VALUES ('Turkey','TR','TUR')
INSERT INTO #isoCode VALUES ('Turkmenistan','TM','TKM')
INSERT INTO #isoCode VALUES ('Tuvalu','TV','TUV')
INSERT INTO #isoCode VALUES ('Uganda','UG','UGA')
INSERT INTO #isoCode VALUES ('Ukraine','UA','UKR')
INSERT INTO #isoCode VALUES ('United Arab Emirates','AE','ARE')
INSERT INTO #isoCode VALUES ('United Kingdom','GB','GBR')
INSERT INTO #isoCode VALUES ('United States','US','USA')
INSERT INTO #isoCode VALUES ('Uruguay','UY','URY')
INSERT INTO #isoCode VALUES ('Uzbekistan','UZ','UZB')
INSERT INTO #isoCode VALUES ('Vanuatu','VU','VUT')
INSERT INTO #isoCode VALUES ('Vatican City','VA','VAT')
INSERT INTO #isoCode VALUES ('Venezuela','VE','VEN')
INSERT INTO #isoCode VALUES ('Vietnam','VN','VNM')
INSERT INTO #isoCode VALUES ('Yemen','YE','YEM')
INSERT INTO #isoCode VALUES ('Zambia','ZM','ZMB')
INSERT INTO #isoCode VALUES ('Zimbabwe','ZW','ZWE')
INSERT INTO #isoCode VALUES ('Abkhazia','GE','GEO')
INSERT INTO #isoCode VALUES ('China, Republic of (Taiwan)','TW','TWN')
INSERT INTO #isoCode VALUES ('Nagorno-Karabakh','AZ','AZE')
INSERT INTO #isoCode VALUES ('Northern Cyprus','CY','CYP')
INSERT INTO #isoCode VALUES ('Pridnestrovie (Transnistria)','MD','MDA')
INSERT INTO #isoCode VALUES ('Somaliland','SO','SOM')
INSERT INTO #isoCode VALUES ('South Ossetia','GE','GEO')
INSERT INTO #isoCode VALUES ('Ashmore and Cartier Islands','AU','AUS')
INSERT INTO #isoCode VALUES ('Christmas Island','CX','CXR')
INSERT INTO #isoCode VALUES ('Cocos (Keeling) Islands','CC','CCK')
INSERT INTO #isoCode VALUES ('Coral Sea Islands','AU','AUS')
INSERT INTO #isoCode VALUES ('Heard Island and McDonald Islands','HM','HMD')
INSERT INTO #isoCode VALUES ('Norfolk Island','NF','NFK')
INSERT INTO #isoCode VALUES ('New Caledonia','NC','NCL')
INSERT INTO #isoCode VALUES ('French Polynesia','PF','PYF')
INSERT INTO #isoCode VALUES ('Mayotte','YT','MYT')
INSERT INTO #isoCode VALUES ('Saint Barthelemy','GP','GLP')
INSERT INTO #isoCode VALUES ('Saint Martin','GP','GLP')
INSERT INTO #isoCode VALUES ('Saint Pierre and Miquelon','PM','SPM')
INSERT INTO #isoCode VALUES ('Wallis and Futuna','WF','WLF')
INSERT INTO #isoCode VALUES ('French Southern and Antarctic Lands','TF','ATF')
INSERT INTO #isoCode VALUES ('Clipperton Island','PF','PYF')
INSERT INTO #isoCode VALUES ('Bouvet Island','BV','BVT')
INSERT INTO #isoCode VALUES ('Cook Islands','CK','COK')
INSERT INTO #isoCode VALUES ('Niue','NU','NIU')
INSERT INTO #isoCode VALUES ('Tokelau','TK','TKL')
INSERT INTO #isoCode VALUES ('Guernsey','GG','GGY')
INSERT INTO #isoCode VALUES ('Isle of Man','IM','IMN')
INSERT INTO #isoCode VALUES ('Jersey','JE','JEY')
INSERT INTO #isoCode VALUES ('Anguilla','AI','AIA')
INSERT INTO #isoCode VALUES ('Bermuda','BM','BMU')
INSERT INTO #isoCode VALUES ('British Indian Ocean Territory','IO','IOT')
INSERT INTO #isoCode VALUES ('British Virgin Islands','VG','VGB')
INSERT INTO #isoCode VALUES ('Cayman Islands','KY','CYM')
INSERT INTO #isoCode VALUES ('Falkland Islands (Islas Malvinas)','FK','FLK')
INSERT INTO #isoCode VALUES ('Gibraltar','GI','GIB')
INSERT INTO #isoCode VALUES ('Montserrat','MS','MSR')
INSERT INTO #isoCode VALUES ('Pitcairn Islands','PN','PCN')
INSERT INTO #isoCode VALUES ('Saint Helena','SH','SHN')
INSERT INTO #isoCode VALUES ('South Georgia & South Sandwich Islands','GS','SGS')
INSERT INTO #isoCode VALUES ('Turks and Caicos Islands','TC','TCA')
INSERT INTO #isoCode VALUES ('Northern Mariana Islands','MP','MNP')
INSERT INTO #isoCode VALUES ('Puerto Rico','PR','PRI')
INSERT INTO #isoCode VALUES ('American Samoa','AS','ASM')
INSERT INTO #isoCode VALUES ('Baker Island','UM','UMI')
INSERT INTO #isoCode VALUES ('Guam','GU','GUM')
INSERT INTO #isoCode VALUES ('Howland Island','UM','UMI')
INSERT INTO #isoCode VALUES ('Jarvis Island','UM','UMI')
INSERT INTO #isoCode VALUES ('Johnston Atoll','UM','UMI')
INSERT INTO #isoCode VALUES ('Kingman Reef','UM','UMI')
INSERT INTO #isoCode VALUES ('Midway Islands','UM','UMI')
INSERT INTO #isoCode VALUES ('Navassa Island','UM','UMI')
INSERT INTO #isoCode VALUES ('Palmyra Atoll','UM','UMI')
INSERT INTO #isoCode VALUES ('U.S. Virgin Islands','VI','VIR')
INSERT INTO #isoCode VALUES ('Wake Island','UM','UMI')
INSERT INTO #isoCode VALUES ('Hong Kong','HK','HKG')
INSERT INTO #isoCode VALUES ('Macau','MO','MAC')
INSERT INTO #isoCode VALUES ('Faroe Islands','FO','FRO')
INSERT INTO #isoCode VALUES ('Greenland','GL','GRL')
INSERT INTO #isoCode VALUES ('French Guiana','GF','GUF')
INSERT INTO #isoCode VALUES ('Guadeloupe','GP','GLP')
INSERT INTO #isoCode VALUES ('Martinique','MQ','MTQ')
INSERT INTO #isoCode VALUES ('Reunion','RE','REU')
INSERT INTO #isoCode VALUES ('Aland','AX','ALA')
INSERT INTO #isoCode VALUES ('Aruba','AW','ABW')
INSERT INTO #isoCode VALUES ('Netherlands Antilles','AN','ANT')
INSERT INTO #isoCode VALUES ('Svalbard','SJ','SJM')
INSERT INTO #isoCode VALUES ('Ascension','AC','ASC')
INSERT INTO #isoCode VALUES ('Tristan da Cunha','TA','TAA')
INSERT INTO #isoCode VALUES ('Australian Antarctic Territory','AQ','ATA')
INSERT INTO #isoCode VALUES ('Ross Dependency','AQ','ATA')
INSERT INTO #isoCode VALUES ('Peter I Island','AQ','ATA')
INSERT INTO #isoCode VALUES ('Queen Maud Land','AQ','ATA')
INSERT INTO #isoCode VALUES ('British Antarctic Territory','AQ','ATA')

DECLARE db_cur CURSOR FORWARD_ONLY READ_ONLY LOCAL FOR
  SELECT Country, ISO2, ISO3
  FROM #isoCode
OPEN db_cur
FETCH NEXT FROM db_cur INTO @CountryName, @ISO_3166_A2, @ISO_3166_A3

WHILE @@FETCH_STATUS = 0
BEGIN
  IF @CountryName = 'United States'
    UPDATE Countries SET ISO_3166_A2 = @ISO_3166_A2, ISO_3166_A3 = @ISO_3166_A3 WHERE CountryName = @CountryName OR CountryName = 'USA'
  ELSE IF @CountryName = 'United Kingdom'
    UPDATE Countries SET ISO_3166_A2 = @ISO_3166_A2, ISO_3166_A3 = @ISO_3166_A3 WHERE CountryName = @CountryName OR CountryName = 'Storbritanien' OR CountryName = 'Great Britain'
  ELSE IF @CountryName = 'China, People''s Republic of'
    UPDATE Countries SET ISO_3166_A2 = @ISO_3166_A2, ISO_3166_A3 = @ISO_3166_A3 WHERE CountryName = @CountryName OR CountryName = 'Kina' OR CountryName = 'China'
  ELSE IF @CountryName = 'Congo, (Congo ? Kinshasa)'
    UPDATE Countries SET ISO_3166_A2 = @ISO_3166_A2, ISO_3166_A3 = @ISO_3166_A3 WHERE CountryName = @CountryName OR CountryName = 'Congo'
  ELSE IF @CountryName = 'Italy'
    UPDATE Countries SET ISO_3166_A2 = @ISO_3166_A2, ISO_3166_A3 = @ISO_3166_A3 WHERE CountryName = @CountryName OR CountryName = 'Italia' OR CountryName = 'Italien'
  ELSE IF @CountryName = 'Ecuador'
    UPDATE Countries SET ISO_3166_A2 = @ISO_3166_A2, ISO_3166_A3 = @ISO_3166_A3 WHERE CountryName = @CountryName OR CountryName = 'Equador'
  ELSE IF @CountryName = 'Korea, South'
    UPDATE Countries SET ISO_3166_A2 = @ISO_3166_A2, ISO_3166_A3 = @ISO_3166_A3 WHERE CountryName = @CountryName OR CountryName = 'South Korea'
  ELSE IF @CountryName = 'Sri Lanka'
    UPDATE Countries SET ISO_3166_A2 = @ISO_3166_A2, ISO_3166_A3 = @ISO_3166_A3 WHERE CountryName = @CountryName OR CountryName = 'Sri Lanca'
  ELSE IF @CountryName = 'Netherlands'
    UPDATE Countries SET ISO_3166_A2 = @ISO_3166_A2, ISO_3166_A3 = @ISO_3166_A3 WHERE CountryName = @CountryName OR CountryName = 'Netherland'
  ELSE IF @CountryName = 'Turkey'
    UPDATE Countries SET ISO_3166_A2 = @ISO_3166_A2, ISO_3166_A3 = @ISO_3166_A3 WHERE CountryName = @CountryName OR CountryName = 'Turkia'
  ELSE IF @CountryName = 'Tunisia'
    UPDATE Countries SET ISO_3166_A2 = @ISO_3166_A2, ISO_3166_A3 = @ISO_3166_A3 WHERE CountryName = @CountryName OR CountryName = 'Tunesia'
  ELSE IF @CountryName = 'Vatican City'
    UPDATE Countries SET ISO_3166_A2 = @ISO_3166_A2, ISO_3166_A3 = @ISO_3166_A3 WHERE CountryName = @CountryName OR CountryName = 'Vatican'
  ELSE IF @CountryName = 'Aland'
    UPDATE Countries SET ISO_3166_A2 = @ISO_3166_A2, ISO_3166_A3 = @ISO_3166_A3 WHERE CountryName = @CountryName OR CountryName = 'Åland'
  ELSE IF @CountryName = 'Croatia'
    UPDATE Countries SET ISO_3166_A2 = @ISO_3166_A2, ISO_3166_A3 = @ISO_3166_A3 WHERE CountryName = @CountryName OR CountryName = 'Kroatia'
  ELSE
    UPDATE Countries SET ISO_3166_A2 = @ISO_3166_A2, ISO_3166_A3 = @ISO_3166_A3 WHERE CountryName = @CountryName

  FETCH NEXT FROM db_cur INTO @CountryName, @ISO_3166_A2, @ISO_3166_A3
END

CLOSE db_cur
DEALLOCATE db_cur

DROP TABLE #ISOcode

--SELECT CountryName, ISO_3166_A2, ISO_3166_A3, * FROM Countries (NOLOCK) ORDER BY SortNumber