[postgis-users] data join

Paul Ramsey pramsey at refractions.net
Fri Apr 25 10:38:39 PDT 2003


Does the query work when you try it in psql? It looks a little odd to me.
P.

Randy James wrote:
> Hi
> 
> I am attempting to join two tables but keep getting errors.
> Can anyone tell me what i am doing wrong? I can get the
> layer to display, but when i try and join another table to
> it i get an error. I'm using mapserver 3.7 and postgis
> 0.7.3 and postgresql 7.2.3
> 
> 
> My map file portion that creates the error. (all on one
> line)
> 
>  DATA "the_geom from (SELECT  oid, * from arch2 as oid,
> from arch2 LEFT JOIN req375 ON arch2.bordennumb =
> req375.BORDEN) AS join_arch USING UNIQUE oid USING SRID=-1"
> 
> The error returned to me:
> 
> prep_DB(): Query error. Error executing POSTGIS DECLARE
> (the actual query) statement: 'DECLARE mycursor BINARY
> CURSOR FOR SELECT
> asbinary(force_collection(force_2d(the_geom)),'NDR'),oid::text
> from (SELECT oid, * from arch2 as oid, from arch2 LEFT JOIN
> req375 ON arch2.bordennumb = req375.BORDEN) AS join_arch
> WHERE the_geom && setSRID('BOX3D(351340.426
> 5467761,682372.574 5682854)'::BOX3D,
> find_srid('','arch2','the_geom') )' 
> 
> Postgresql reports the error 'ERROR: parser: parse error at
> or near "from" '
> 
> Cheers
> Randy
> 
> __________________________________________________
> Do you Yahoo!?
> The New Yahoo! Search - Faster. Easier. Bingo
> http://search.yahoo.com
> 
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users


-- 
       __
      /
      | Paul Ramsey
      | Refractions Research
      | Email: pramsey at refractions.net
      | Phone: (250) 885-0632
      \_




More information about the postgis-users mailing list