« Return to Thread: alle plz eines landkreises bekommen

Re: alle plz eines landkreises bekommen

by Martin Brenda :: Rate this Message:

Reply to Author | View in Thread

Am Freitag, 13. Oktober 2006 13:15 schrieb jonass:

> hallo,
>
> wie erhalte ich denn alle postleitzahlen loc_ids aus einem bestimmten
> landkreis?
> also einmal zb. die stadt regensburg und einmal die des umkreises. komme
> mit den hierarchies an diesem punkt nicht wirklich weiter.
>
> -jonas
> --
> View this message in context:
> http://www.nabble.com/alle-plz-eines-landkreises-bekommen-tf2436363.html#a6
>793741 Sent from the Php German - opengeodb mailing list archive at
> Nabble.com.

So müsste es gehen (unter der Annahme Landkreis = Kreisfreie Stadt
Regensburg):

SELECT b.loc_id,c.text_val FROM geodb_hierarchies AS b, geodb_textdata AS c
WHERE b.loc_id = c.loc_id AND b.id_lvl5 = '456' AND c.text_type = 500300000
GROUP BY c.text_val

So bekommst Du alle PLZs. Wenn Du nur die loc_id's willst, dann am Ende "GROUP
BY b.loc_id" statt "GROUP BY c.text_val"

Gruß,
Martin Brenda
--
eMail: martin.brenda@...
Web: www.brendaonline.de
--
Mailingliste OpenGeoDB
Listenadresse: opengeodb@...
Informationen: http://opengeodb.de
Mit freundlicher Unterstütztung von php::bar (http://phpbar.de)

 « Return to Thread: alle plz eines landkreises bekommen