<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal>Dear All,<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></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.<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

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

<p class=MsoNormal>&nbsp;&nbsp; Name &quot;Continents&quot;<o:p></o:p></p>

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

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

<p class=MsoNormal>&nbsp;&nbsp; <u>DATA &quot;the_geom from
rgp_gis_continent&quot;<o:p></o:p></u></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

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

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

<p class=MsoNormal>&nbsp;<o:p></o:p></p>

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

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

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>Below is my error <o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>prepare_database(): Query error. Error executing POSTGIS
DECLARE (the actual query) statement: 'DECLARE mycursor BINARY CURSOR FOR
SELECT &quot;continent&quot;::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') ))' <o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

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

<p class=MsoNormal>'<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

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

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

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

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

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

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

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

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

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

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

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

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

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

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

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

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

<p class=MsoNormal>Venkat.<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

</div>

</body>

</html>