[postgis-users] problem in dynamic SQL with Mapserver

Mark Cave-Ayland mark.cave-ayland at ilande.co.uk
Tue Feb 27 02:25:24 PST 2007


On Tue, 2007-02-27 at 01:49 -0800, nimalika fernando wrote:
> Hi Drew,
>  
> thank you for your help Drew,
>  
> But still i am not successful in this query. Modified query is as
> follows
>  
> DATA "the_geom from (select alldsdivisions.the_geom as
> the_geom,alldsdivisions.gid as oid , 
>     alldsdivisions.dsd_n as  dsd_n from alldsdivisions 
>     where alldsdivisions.dsd_n ='%qstring%')
>  
> error mesage I get is as follows
>  
> prepare_database(): Query error. Error executing POSTGIS DECLARE (the
> actual query) statement: 'DECLARE mycursor BINARY CURSOR FOR SELECT
> dsd_n::text,asbinary(force_collection(force_2d(the_geom)),'NDR'),oid::text from (select alldsdivisions.the_geom as the_geom,alldsdivisions.gid as oid , alldsdivisions.dsd_n as dsd_n from alldsdivisions where alldsdivisions.dsd_n ='Ambalanthota') AS selectedgs WHERE (Ambalanthota) and (the_geom && setSRID( 'BOX3D(181659.373889 74242.41425975,303213.047119 165407.66918225)'::BOX3D,-1) )' 
> 
> Postgresql reports the error as 'ERROR: column "ambalanthota" does not
> exist '
> 
>  
> here , "Ambalanthota" mean a value of coumn dsd_n of table
> alldsdivisions.
> can anybody help me to figure out a solution , pls?
> 
> thank you in advance,
>  
> Nimalika


Well the above query is clearly wrong where it states "... WHERE
(Ambalanthota)" so I'd say this is a Mapserver rather than a PostGIS
issue. I think you need to bring this up on the mapserver-users mailing
list at http://mapserver.gis.umn.edu instead.


Kind regards,

Mark.





More information about the postgis-users mailing list