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

surahman putra surahmanputra at gmail.com
Mon Aug 13 01:24:09 PDT 2012


Thanks Thomas,

But After I add FROM clause, it still give same message.
Do you have any idea what should I do to fix this problem?

Surahman

On Mon, Aug 13, 2012 at 2:26 PM, thomas bonfort <thomas.bonfort at gmail.com>wrote:

> 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
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20120813/f7e8752b/attachment.html>


More information about the mapserver-users mailing list