GeoNames Home | Postal Codes | Download / Webservice | About 

GeoNames Forum
  [Search] Search   [Recent Topics] Recent Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Query capitals of first-order administrative division  XML
Forum Index -> Administrative Divisions
Author Message
Andre



Joined: 07/09/2024 15:35:00
Messages: 1
Offline

Hi, first of all I would like to thank the Geonames team for the good data provided.

The last couple of days I was trying to query the administrative regions of some countries and their capitals.

If I understood this right I use a query like the following to get the capital of England for instance:

SELECT * FROM geoname
WHERE country_code LIKE 'GB'
AND admin1_code LIKE 'ENG'
AND fcode LIKE 'PPLA';

Result: West Ilsley (geonameid: 11747336)

Obviously this is wrong! The correct result should be 'London'.

Am I doing anything wrong? Is there another way to query the regional capitals?

Any help would be much appreciated. Thanks.
 
Forum Index -> Administrative Divisions
Go to:   
Powered by JForum 2.1.5 © JForum Team