logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

Re: alle plz eines landkreises bekommen: msg#00053

Subject: Re: alle plz eines landkreises bekommen
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-79B+/cAkMnnbFfAX06+HdQ@xxxxxxxxxxxxxxxx
Web: www.brendaonline.de
-- 
Mailingliste OpenGeoDB
Listenadresse: opengeodb-r1mDYR0DdAyzQB+pC5nmwQ@xxxxxxxxxxxxxxxx
Informationen: http://opengeodb.de
Mit freundlicher Unterstütztung von php::bar (http://phpbar.de)



<Prev in Thread] Current Thread [Next in Thread>