[postgis-users] data join

Randy James rjames57 at yahoo.com
Fri Apr 25 10:31:55 PDT 2003


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



More information about the postgis-users mailing list