Results 1 to 6 of 6
Thread: Get a distinct value
Mar 28, 2010, 14:04 #1
- Join Date
- Sep 2005
- Puerto de Mazarron, Murcia, Spain
- 0 Post(s)
- 0 Thread(s)
Get a distinct value
I have a table which contains towns and municipalities in Spain.
I want users to select a distinct geonameid which corresponds to a town or municipality.
If the municipality asciiname is the same as a town name, i just want the municipality.
This query is incorrect as it returns both the town and municipalities.
select distinct geonameid, asciiname from geo_import where (feature_code = 'ADM3' OR feature_code = 'PPL') AND province_id = '2509951' order by asciiname asc