GeoNames Home | Postal Codes | Download / Webservice | About 

GeoNames Forum
  [Search] Search   [Recent Topics] Recent Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Problem: More than one PREFERED_NAME for PLACE_ID and ISO_LANG  XML
Forum Index -> General
Author Message
dracopql



Joined: 23/06/2008 16:22:49
Messages: 5
Location: Uruguay
Offline

Hi, people!
We've been working for 5 months with your database and we haven't found any problems until now, but we do not know if this is really a problem.
The problem is that there are more than one preferred name for the same place with the same language. This caused problems with our queries, so we chose to uncheck the repeated preferred name randomly.

The query to know the repeated rows is this:

SELECT A.*
FROM ALTNAMES A
INNER JOIN (SELECT PLACE_ID, ISO_LANG, COUNT(PREFERRED) AS COUNT
FROM ALTNAMES
WHERE IGNORED = 0 AND PREFERRED = 1
GROUP BY PLACE_ID, ISO_LANG
HAVING COUNT(PREFERRED) > 1) AS TT
ON A.PLACE_ID = TT.PLACE_ID
AND A.ISO_LANG = TT.ISO_LANG
ORDER BY PLACE_ID

We want to know if this is an error or not
Thanks and happy new year!

Draco
[WWW]
marc



Joined: 08/12/2005 07:39:47
Messages: 4501
Offline

Hi Draco

If you think it is an error than you can help fix the duplicates

Best

Marc

[WWW]
dracopql



Joined: 23/06/2008 16:22:49
Messages: 5
Location: Uruguay
Offline

We already solve the problem in our database ... we just want to know if it is a real problem (corrupted data).
If that is the case, we'll be proud to help (we'll pass the query).
Just confirm that it is a real problem.

Thanks
Draco
[WWW]
marc



Joined: 08/12/2005 07:39:47
Messages: 4501
Offline

Hi Draco

The problem is not the query, the problem is to decide which one is the 'best' preferred name'. Someone would need to look at all the duplicates and take a n intelligent decision. It is not an issue of 'corrupt' data, it is an issue of nobody having chosen a single preferred name.

Marc

[WWW]
dracopql



Joined: 23/06/2008 16:22:49
Messages: 5
Location: Uruguay
Offline

Hi, Marc

You're right, we'll going to make the human choices and, if you think is appropiated, we can make a new post with the remaining places and see if there are people who knows the right one.

Hugs
Draco
[WWW]
 
Forum Index -> General
Go to:   
Powered by JForum 2.1.5 © JForum Team