countries-regions-cities icon indicating copy to clipboard operation
countries-regions-cities copied to clipboard

No region names for canada.

Open vishalrevadi opened this issue 5 years ago • 2 comments

region names are empty for canada and few other countries.

vishalrevadi avatar Aug 18 '19 08:08 vishalrevadi

For anyone else who runs into this, this is the SQL I run to fix the missing Canadian region names and the 'NULL' Country.

update countries set name = 'Guernsey' where code = 'gg';
update regions set name = 'British Columbia' where id = 486;
update regions set name = 'Saskatchewan' where id = 487;
update regions set name = 'Quebec' where id = 488;
update regions set name = 'Alberta' where id = 489;
update regions set name = 'Newfoundland and Labrador' where id = 490;
update regions set name = 'Ontario' where id = 491;
update regions set name = 'Nova Scotia' where id = 492;
update regions set name = 'Yukon' where id = 493;
update regions set name = 'Northwest Territories' where id = 494;
update regions set name = 'Nunavut' where id = 495;
update regions set name = 'Prince Edward Island' where id = 496;
update regions set name = 'New Brunswick' where id = 497;
update regions set name = 'Manitoba' where id = 498;

The province names are from googling cities returned by the SELECT below.

SELECT C.name, R.id FROM regions R
LEFT OUTER JOIN cities C
ON C.region_id = R.id
WHERE R.country_id = 33;

zensible avatar Sep 26 '20 20:09 zensible

thank you for sharing @zensible

bekirdag avatar Oct 10 '20 07:10 bekirdag