<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Venkat,<br><br>Are you using a filter ? I can see in the SQL statement this: WHERE (Africa). So I guess<br>you have FILTER "Africa" instead FILTER " continent = 'Africa' ". Try this and let me know<br>what happened.<br><br>Greetings from México<br><br><div><strong><font color="#0000bf">IC Carlos Ruiz</font></strong></div><div><strong><font color="#0000bf"></font></strong> <br></div><br>--- On <b>Thu, 8/7/08, Venkat Rao Tammineni <i>&lt;vtammineni@roulacglobal.com&gt;</i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;">From: Venkat Rao Tammineni &lt;vtammineni@roulacglobal.com&gt;<br>Subject: [mapserver-users] Reg: QueryMap(Zoom To Shape) with Mapserver PostgreSql/PostGIS<br>To: mapserver-users@lists.osgeo.org, mapserver-users-owner@lists.osgeo.org, mapserver-dev@lists.osgeo.org,
 mapserver-commits@lists.osgeo.org<br>Date: Thursday, August 7, 2008, 6:35 AM<br><br><div id="yiv1165953732">


 
 
<style>
<!--#yiv1165953732  
 _filtered #yiv1165953732 {font-family:Calibri;panose-1:2 15 5 2 2 2 4 3 2 4;}
#yiv1165953732  
#yiv1165953732 p.MsoNormal, #yiv1165953732 li.MsoNormal, #yiv1165953732 div.MsoNormal
        {margin:0in;margin-bottom:.0001pt;font-size:11.0pt;font-family:"Calibri", "sans-serif";}
#yiv1165953732 a:link, #yiv1165953732 span.MsoHyperlink
        {color:blue;text-decoration:underline;}
#yiv1165953732 a:visited, #yiv1165953732 span.MsoHyperlinkFollowed
        {color:purple;text-decoration:underline;}
#yiv1165953732 span.EmailStyle17
        {font-family:"Calibri", "sans-serif";color:windowtext;}
#yiv1165953732 .MsoChpDefault
        {}
 _filtered #yiv1165953732 {margin:1.0in 1.0in 1.0in 1.0in;}
#yiv1165953732 div.Section1
        {}
-->
</style>

<div class="Section1">

<p class="MsoNormal">Dear All,</p> 

<p class="MsoNormal"> &nbsp;</p> 

<p class="MsoNormal">I am getting error with query map.But it is working fine for
Shape files.Only&nbsp; I am getting error with Postgresql/PostGIS.I do not know
where&nbsp; I am doing wrong.</p> 

<p class="MsoNormal"> &nbsp;</p> 

<p class="MsoNormal">Here is my Map File Code :- </p> 

<p class="MsoNormal">&nbsp;&nbsp; Name "Continents"</p> 

<p class="MsoNormal">&nbsp;&nbsp; CONNECTIONTYPE POSTGIS</p> 

<p class="MsoNormal">&nbsp;&nbsp; CONNECTION "host=192.168.1.158 dbname=GIS
password=administrator user=postgres port=5432"</p> 

<p class="MsoNormal">&nbsp;&nbsp; <u>DATA "the_geom from
rgp_gis_continent"</u></p> 

<p class="MsoNormal"> &nbsp;</p> 

<p class="MsoNormal">And I have also used like </p> 

<p class="MsoNormal">&nbsp; &nbsp;&nbsp;&nbsp;<u>DATA "the_geom from
rgp_gis_continent using unique gid and SRID=-1"</u></p> 

<p class="MsoNormal">&nbsp;</p> 

<p class="MsoNormal">But this also getting the same error.I am&nbsp; using
Mapserver 5.0&nbsp; and Postgresql8.1.</p> 

<p class="MsoNormal">Please let me know where &nbsp;I am doing wrong.</p> 

<p class="MsoNormal"> &nbsp;</p> 

<p class="MsoNormal"> &nbsp;</p> 

<p class="MsoNormal"> &nbsp;</p> 

<p class="MsoNormal">Below is my error </p> 

<p class="MsoNormal"> &nbsp;</p> 

<p class="MsoNormal"> &nbsp;</p> 

<p class="MsoNormal">prepare_database(): Query error. Error executing POSTGIS
DECLARE (the actual query) statement: 'DECLARE mycursor BINARY CURSOR FOR
SELECT "continent"::text,asbinary(force_collection(force_2d(the_geom)),'NDR'),gid::text
from rgp_gis_continent WHERE (Africa) and (the_geom &amp;&amp; setSRID(
'BOX3D(-180 -112.415519399249,180
112.415519399249)'::BOX3D,find_srid('','rgp_gis_continent','the_geom') ))' </p> 

<p class="MsoNormal"> &nbsp;</p> 

<p class="MsoNormal">Postgresql reports the error as 'ERROR:&nbsp; column
"africa" does not exist</p> 

<p class="MsoNormal">'</p> 

<p class="MsoNormal"> &nbsp;</p> 

<p class="MsoNormal">More Help:</p> 

<p class="MsoNormal"> &nbsp;</p> 

<p class="MsoNormal">Error with POSTGIS data variable. You specified 'check your
.map file'.</p> 

<p class="MsoNormal">Standard ways of specifiying are : </p> 

<p class="MsoNormal">(1) 'geometry_column from geometry_table' </p> 

<p class="MsoNormal">(2) 'geometry_column from (sub query) as foo using unique column
name using SRID=srid#' </p> 

<p class="MsoNormal"> &nbsp;</p> 

<p class="MsoNormal">Make sure you put in the 'using unique&nbsp; column name'
and 'using SRID=#' clauses in.</p> 

<p class="MsoNormal"> &nbsp;</p> 

<p class="MsoNormal">For more help, please see <a rel="nofollow" target="_blank" href="http://postgis.refractions.net/documentation/">http://postgis.refractions.net/documentation/</a>
</p> 

<p class="MsoNormal"> &nbsp;</p> 

<p class="MsoNormal">Mappostgis.c - version of Jan 23/2004.</p> 

<p class="MsoNormal"> &nbsp;</p> 

<p class="MsoNormal"> &nbsp;</p> 

<p class="MsoNormal"> &nbsp;</p> 

<p class="MsoNormal">I am waiting for your great response.</p> 

<p class="MsoNormal"> &nbsp;</p> 

<p class="MsoNormal">&nbsp;Thanks and Regards</p> 

<p class="MsoNormal">Venkat.</p> 

<p class="MsoNormal"> &nbsp;</p> 

</div>

 

</div><pre>_______________________________________________<br>mapserver-users mailing list<br>mapserver-users@lists.osgeo.org<br>http://lists.osgeo.org/mailman/listinfo/mapserver-users<br></pre></blockquote></td></tr></table><br>