[mapserver-users] error with SQL query

Luca Delucchi lucadeluge at gmail.com
Tue Nov 12 04:59:52 PST 2013


Hi all,

I'm trying to use a "complex" SQL query on my layer but it return an error.
My definition on the mapfile is

grid_5x5.geom, grid_5x5.gid, count(occurrence.specie) AS count FROM
(occurrence JOIN grid_5x5 ON (st_intersects(occurrence.wkb_geometry,
grid_5x5.geom))) WHERE specie='ursarc' GROUP BY grid_5x5.gid as
subquery USING UNIQUE grid_5x5.gid USING UNIQUE 25832

and it works well on postgis.
The error returned is

msDrawMap(): Image handling error. Failed to draw layer named
'orsobruno'. msPostGISLayerWhichShapes(): Query error. Failed to build
query SQL. msPostGISBuildSQL(): General error message. Failed to build
SQL 'where'.

Someone can help me?

thanks

-- 
ciao
Luca

http://gis.cri.fmach.it/delucchi/
www.lucadelu.org



More information about the MapServer-users mailing list