Re: [GENERAL] what the problem with this query

From: "William Penberthy" <bpenberthy(at)scarpatechnology(dot)com>
To: "'venu gopal'" <gopalonline2(at)yahoo(dot)co(dot)uk>, <pgsql-admin(at)postgresql(dot)org>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: [GENERAL] what the problem with this query
Date: 2006-04-14 11:26:33
Message-ID: !&!AAAAAAAAAAAYAAAAAAAAAAGZJtg+Hf1OimjKwiCyfgjCgAAAEAAAAHU3DTbbxtVDsWJZZ5fEFC4BAAAAAA==@scarpatechnology.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-general

IT appears you have one too many closing parans.

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

_____

From: pgsql-general-owner(at)postgresql(dot)org
[mailto:pgsql-general-owner(at)postgresql(dot)org] On Behalf Of venu gopal
Sent: Friday, April 14, 2006 5:09 AM
To: pgsql-admin(at)postgresql(dot)org; pgsql-general(at)postgresql(dot)org
Subject: [GENERAL] what the problem with this query

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

Regards,
venu

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Achilleus Mantzios 2006-04-14 11:27:41 Re: Kernel 2.4->2.6 upgrade results in PANIC: could not locate a
Previous Message venu gopal 2006-04-14 11:09:16 what the problem with this query

Browse pgsql-general by date

  From Date Subject
Next Message Achilleus Mantzios 2006-04-14 11:27:41 Re: Kernel 2.4->2.6 upgrade results in PANIC: could not locate a
Previous Message venu gopal 2006-04-14 11:09:16 what the problem with this query