Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 495819FB30F for ; Fri, 27 Oct 2006 11:34:43 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 94331-08 for ; Fri, 27 Oct 2006 14:34:27 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.226]) by postgresql.org (Postfix) with ESMTP id 482C49FB25F for ; Fri, 27 Oct 2006 11:34:24 -0300 (ADT) Received: by wr-out-0506.google.com with SMTP id 55so175382wri for ; Fri, 27 Oct 2006 07:34:23 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=t68AbTiyjzvB8jSGM5wVZB3MY5ivUEeqAgWKptji6Hrs3u1Eq+CcRu9sJEGqmbdqcBkMfp8g/knTAFZWzdyoDp+DBPjUGqBw2mjhP/d/dVAPCXfhMBGVWQY2plm8GYuPPtRcIBl2ckqAK8o06m3jJ5BsLMuwim5RPH310TMN9kI= Received: by 10.78.188.19 with SMTP id l19mr4537573huf; Fri, 27 Oct 2006 07:34:21 -0700 (PDT) Received: by 10.78.130.19 with HTTP; Fri, 27 Oct 2006 07:34:21 -0700 (PDT) Message-ID: Date: Fri, 27 Oct 2006 09:34:21 -0500 From: "vamsee movva" To: pgsql-sql@postgresql.org Subject: not able to execute query on spatial database. MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_39058_8599880.1161959661923" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.574 tagged_above=0 required=5 tests=DNS_FROM_RFC_ABUSE, HTML_30_40, HTML_MESSAGE, SPF_PASS X-Spam-Level: X-Archive-Number: 200610/218 X-Sequence-Number: 26607 ------=_Part_39058_8599880.1161959661923 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Hello all, I am working with spatial tables. i have two spatial data tables, one represents the whole state and another table represents the damaged locations in the state. My aim is to find number of damaged locations in every county or parish. Here i am giving the query i used to do this, could you please tell me whether i am doing right thing or not. select count(*) from damagedlocations l1,county l2 where (l2.the_geom and l1.the_geom) and l2.parishid=particular_parishid; thanks in advance. vamsee movva ------=_Part_39058_8599880.1161959661923 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hello all,
           I am working with spatial tables. i have two spatial data tables, one represents the whole state and another table represents the damaged locations in the state. My aim is to find number of damaged locations in every county or parish.
Here i am giving the query i used to do this, could you please tell me whether i am doing right thing or not.

select count(*) from damagedlocations l1,county l2 where (l2.the_geom and l1.the_geom) and l2.parishid=particular_parishid;

thanks in advance.
vamsee movva
------=_Part_39058_8599880.1161959661923--