[mapserver-users] postgis layer - postgresql table join eror

thomas bonfort thomas.bonfort at gmail.com
Mon Aug 13 00:26:01 PDT 2012


You're missing a FROM clause, probably something like:

> DATA 'the_geom FROM (SELECT Pipeline.the_geom AS the_geom, Pipeline.gid AS
> gid, Pipeline.status AS status, Kondur_block.id_wk AS id_wk
FROM Pipeline
> LEFT JOIN
> Kondur_block ON Pipeline.id_wk = Kondur_block.id_wk) as subquery USING
> UNIQUE gid USING srid=32648'

--
thomas

On Mon, Aug 13, 2012 at 6:21 AM, Surahman Putra <surahmanputra at gmail.com> wrote:
> Hi
>
>
>
> I’m new mapserver-user. I have problem to join postgis layer to postgre
> table.
>
> Here my map file data:
>
>
>
> DATA 'the_geom FROM (SELECT Pipeline.the_geom AS the_geom, Pipeline.gid AS
> gid, Pipeline.status AS status, Kondur_block.id_wk AS id_wk LEFT JOIN
> Kondur_block ON Pipeline.id_wk = Kondur_block.id_wk) as subquery USING
> UNIQUE gid USING srid=32648'
>
>
>
> And I get this message:
>
>
>
> msDrawMap(): Image handling error. Failed to draw layer named 'Pipeline'.
> msPostGISLayerWhichShapes(): Query error. Error executing query: ERROR:
> syntax error at or near "LEFT" LINE 1: ...".status AS status,
> "Kondur_block".id_wk AS id_wk LEFT JOIN ... ^
>
>
>
> Can annyone sugget what’s wrong with that?
>
> For Information I use mapserver version 6.03 and postgis version 1.5.1
>
>
>
> Thanks,
>
> Surahman
>
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>


More information about the mapserver-users mailing list