Hi, I am sure you will solve it by making a "simple" SQL query which works for you with your data and after that adding one piece at a time for making it more complex. At least you can then send youR next mail as "I had in my DATA 'this' and it worked but once I changed it to 'that' it stopped working. Why?"
Good luck, -Jukka Rahkonen- Luca Delucchi wrote: > 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 > _______________________________________________ > mapserver-users mailing list > mapserver-users@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users _______________________________________________ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users