X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 4D09411F665C; Thu, 20 Apr 2006 22:31:27 -0300 (ADT) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Score: 0.284 X-Spam-Level: X-Spam-Status: No, score=0.284 required=5 tests=[AWL=0.284] Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id gENOqA4SiHZp; Thu, 20 Apr 2006 22:31:20 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- X-Greylist: from auto-whitelisted by SQLgrey- Received: from noel.decibel.org (noel.decibel.org [67.100.216.10]) by postgresql.org (Postfix) with ESMTP id C1A1B11F6640; Thu, 20 Apr 2006 22:31:23 -0300 (ADT) Received: by noel.decibel.org (Postfix, from userid 1001) id 15D3D56427; Thu, 20 Apr 2006 20:31:24 -0500 (CDT) Received: (hashcash-sendmail, from uid 1001); Thu, 20 Apr 2006 20:31:22 -0500 Date: Thu, 20 Apr 2006 20:31:22 -0500 From: "Jim C. Nasby" To: venu gopal Cc: pgsql-admin@postgresql.org, pgsql-general@postgresql.org Subject: Re: what the problem with this query Message-ID: <20060421013122.GQ49405@pervasive.com> References: <20060414110916.9271.qmail@web25608.mail.ukl.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060414110916.9271.qmail@web25608.mail.ukl.yahoo.com> X-Operating-System: FreeBSD 6.0-RELEASE-p4 amd64 X-Distributed: Join the Effort! http://www.distributed.net User-Agent: Mutt/1.5.11 X-Hashcash: 1:20:060421:gopalonline2@yahoo.co.uk::B+BmhUk2/0jX7lmg:0000000000000 0000000000000000000000002Osz X-Hashcash: 1:20:060421:pgsql-admin@postgresql.org::ObxO912fefktrpI4:00000000000 000000000000000000000000259Q X-Hashcash: 1:20:060421:pgsql-general@postgresql.org::9OoUV3cYNEZB145f:000000000 0000000000000000000000009UTV X-Archive-Number: 200604/206 X-Sequence-Number: 21375 On Fri, Apr 14, 2006 at 11:09:16AM +0000, venu gopal wrote: > Hi all, > When i try to run the following query it gives the following error what was wrong in the query. > > Query:SELECT o.orgunitname AS ouname, e.entrynumber AS value_field, centroid(c.the_geom) AS the_geom, c.ogc_fid AS ogc_fid FROM (ctrphc AS c INNER JOIN orgunit o ON c.dhs_ouname = o.orgunitname) INNER JOIN (SELECT orgunitid, entrynumber FROM routinedataou4 WHERE dataelementid=1195 AND dataperiodid = 86) AS e ON o.orgunitid = e.orgunitid) AS new_table USING UNIQUE ogc_fid USING SRID=-1 > > Error::ERROR: syntax error at or near ")" at character 333 Extra ) after the the last ON. -- Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com Pervasive Software http://pervasive.com work: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461