-- insert 164 rows in B
INSERT INTO B (Currency, CurrencyCode) VALUES ('Afghanistan afghani','AFA')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Albanian lek','ALL')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Algerian dinar','DZD')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Angolan kwanza reajustado','AOR')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Argentine peso','ARS')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Armenian dram','AMD')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Aruban guilder','AWG')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Australian dollar','AUD')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Azerbaijanian new manat','AZN')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Bahamian dollar','BSD')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Bahraini dinar','BHD')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Bangladeshi taka','BDT')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Barbados dollar','BBD')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Belarusian ruble','BYR')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Belize dollar','BZD')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Bermudian dollar','BMD')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Bhutan ngultrum','BTN')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Bolivian boliviano','BOB')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Botswana pula','BWP')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Brazilian real','BRL')
INSERT INTO B (Currency, CurrencyCode) VALUES ('British pound','GBP')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Brunei dollar','BND')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Bulgarian lev','BGN')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Burundi franc','BIF')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Cambodian riel','KHR')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Canadian dollar','CAD')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Cape Verde escudo','CVE')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Cayman Islands dollar','KYD')
INSERT INTO B (Currency, CurrencyCode) VALUES ('CFA franc BCEAO','XOF')
INSERT INTO B (Currency, CurrencyCode) VALUES ('CFA franc BEAC','XAF')
INSERT INTO B (Currency, CurrencyCode) VALUES ('CFP franc','XPF')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Chilean peso','CLP')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Chinese yuan renminbi','CNY')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Colombian peso','COP')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Comoros franc','KMF')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Congolese franc','CDF')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Costa Rican colon','CRC')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Croatian kuna','HRK')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Cuban peso','CUP')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Czech koruna','CZK')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Danish krone','DKK')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Djibouti franc','DJF')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Dominican peso','DOP')
INSERT INTO B (Currency, CurrencyCode) VALUES ('East Caribbean dollar','XCD')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Egyptian pound','EGP')
INSERT INTO B (Currency, CurrencyCode) VALUES ('El Salvador colon','SVC')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Eritrean nakfa','ERN')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Estonian kroon','EEK')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Ethiopian birr','ETB')
INSERT INTO B (Currency, CurrencyCode) VALUES ('EU euro','EUR')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Falkland Islands pound','FKP')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Fiji dollar','FJD')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Gambian dalasi','GMD')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Georgian lari','GEL')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Ghanaian new cedi','GHS')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Gibraltar pound','GIP')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Gold (ounce)','XAU')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Gold franc','XFO')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Guatemalan quetzal','GTQ')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Guinean franc','GNF')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Guyana dollar','GYD')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Haitian gourde','HTG')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Honduran lempira','HNL')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Hong Kong SAR dollar','HKD')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Hungarian forint','HUF')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Icelandic krona','ISK')
INSERT INTO B (Currency, CurrencyCode) VALUES ('IMF special drawing right','XDR')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Indian rupee','INR')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Indonesian rupiah','IDR')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Iranian rial','IRR')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Iraqi dinar','IQD')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Israeli new shekel','ILS')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Jamaican dollar','JMD')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Japanese yen','JPY')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Jordanian dinar','JOD')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Kazakh tenge','KZT')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Kenyan shilling','KES')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Kuwaiti dinar','KWD')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Kyrgyz som','KGS')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Lao kip','LAK')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Latvian lats','LVL')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Lebanese pound','LBP')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Lesotho loti','LSL')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Liberian dollar','LRD')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Libyan dinar','LYD')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Lithuanian litas','LTL')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Macao SAR pataca','MOP')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Macedonian denar','MKD')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Malagasy ariary','MGA')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Malawi kwacha','MWK')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Malaysian ringgit','MYR')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Maldivian rufiyaa','MVR')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Mauritanian ouguiya','MRO')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Mauritius rupee','MUR')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Mexican peso','MXN')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Moldovan leu','MDL')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Mongolian tugrik','MNT')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Moroccan dirham','MAD')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Mozambique new metical','MZN')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Myanmar kyat','MMK')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Namibian dollar','NAD')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Nepalese rupee','NPR')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Netherlands Antillian guilder','ANG')
INSERT INTO B (Currency, CurrencyCode) VALUES ('New Zealand dollar','NZD')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Nicaraguan cordoba oro','NIO')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Nigerian naira','NGN')
INSERT INTO B (Currency, CurrencyCode) VALUES ('North Korean won','KPW')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Norwegian krone','NOK')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Omani rial','OMR')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Pakistani rupee','PKR')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Palladium (ounce)','XPD')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Panamanian balboa','PAB')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Papua New Guinea kina','PGK')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Paraguayan guarani','PYG')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Peruvian nuevo sol','PEN')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Philippine peso','PHP')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Platinum (ounce)','XPT')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Polish zloty','PLN')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Qatari rial','QAR')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Romanian new leu','RON')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Russian ruble','RUB')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Rwandan franc','RWF')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Saint Helena pound','SHP')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Samoan tala','WST')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Sao Tome and Principe dobra','STD')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Saudi riyal','SAR')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Serbian dinar','RSD')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Seychelles rupee','SCR')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Sierra Leone leone','SLL')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Silver (ounce)','XAG')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Singapore dollar','SGD')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Solomon Islands dollar','SBD')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Somali shilling','SOS')
INSERT INTO B (Currency, CurrencyCode) VALUES ('South African rand','ZAR')
INSERT INTO B (Currency, CurrencyCode) VALUES ('South Korean won','KRW')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Sri Lanka rupee','LKR')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Sudanese pound','SDG')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Suriname dollar','SRD')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Swaziland lilangeni','SZL')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Swedish krona','SEK')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Swiss franc','CHF')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Syrian pound','SYP')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Taiwan New dollar','TWD')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Tajik somoni','TJS')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Tanzanian shilling','TZS')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Thai baht','THB')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Tongan pa''anga','TOP')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Trinidad and Tobago dollar','TTD')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Tunisian dinar','TND')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Turkish lira','TRY')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Turkmen new manat','TMT')
INSERT INTO B (Currency, CurrencyCode) VALUES ('UAE dirham','AED')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Uganda new shilling','UGX')
INSERT INTO B (Currency, CurrencyCode) VALUES ('UIC franc','XFU')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Ukrainian hryvnia','UAH')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Uruguayan peso uruguayo','UYU')
INSERT INTO B (Currency, CurrencyCode, ExchangeRate) VALUES ('US dollar','USD',1)
INSERT INTO B (Currency, CurrencyCode) VALUES ('Uzbekistani sum','UZS')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Vanuatu vatu','VUV')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Venezuelan bolivar fuerte','VEF')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Vietnamese dong','VND')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Yemeni rial','YER')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Zambian kwacha','ZMK')
INSERT INTO B (Currency, CurrencyCode) VALUES ('Zimbabwe dollar','ZWL')

-- insert 109,660,800 rows in A, with 1% non-USD
INSERT INTO A (CurrencyCode) SELECT TOP 99 'USD' FROM sysobjects
INSERT INTO A (CurrencyCode) VALUES ('AWG')
INSERT INTO A (CurrencyCode) SELECT TOP 99 'USD' FROM sysobjects
INSERT INTO A (CurrencyCode) VALUES ('EUR')
INSERT INTO A (CurrencyCode) SELECT TOP 99 'USD' FROM sysobjects
INSERT INTO A (CurrencyCode) VALUES ('SRD')
Declare @i int
Set @i=1
While @i < 26 Begin
  INSERT INTO A (CurrencyCode) SELECT TOP 10000000 CurrencyCode FROM A
  -- checkpoint
  
  Set @i=@i+1
End
