Re: what the problem with this query

From: "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>
To: venu gopal <gopalonline2(at)yahoo(dot)co(dot)uk>
Cc: pgsql-admin(at)postgresql(dot)org, pgsql-general(at)postgresql(dot)org
Subject: Re: what the problem with this query
Date: 2006-04-21 01:31:22
Message-ID: 20060421013122.GQ49405@pervasive.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-general

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(at)pervasive(dot)com
Pervasive Software http://pervasive.com work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Jim C. Nasby 2006-04-21 01:42:43 Re: Slony1 or DRBD for replication ?
Previous Message Jim C. Nasby 2006-04-20 22:47:38 Re: Problem with SELECT FOR UPDATE NOWAIT

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2006-04-21 02:44:54 Re: sudo-like behavior
Previous Message Agent M 2006-04-21 01:07:00 Re: sudo-like behavior