Jorn,<br><br>I have tried to add the following:<br><br>DATA &quot;the_geom from b_capa_percid AS foo USING UNIQUE gid using SRD=31300&quot;<br>but that turns other errors.<br><br>When I try to do your suggestions, the query takes forever to run...
<br><br>Steven<br><br><div class="gmail_quote">
On Nov 19, 2007 2:34 PM, Jørn Vegard Røsnes &lt;<a href="mailto:jorn@spacetec.no" target="_blank">jorn@spacetec.no</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

Hi,<br><br>try to add the column to the tables<br>alter table &lt;table&gt; add column oid integer;<br><div><div></div><div><br><br><br>On Monday 19 November 2007 14:27, Steven De Vriendt wrote:<br>&gt; Jorn,
<br>&gt;<br>&gt; I have the following columns:<br>&gt;<br>&gt; gid<br>&gt; capakey<br>&gt; percid<br>&gt; capaty<br>&gt; shape_area<br>&gt; the_geom<br>&gt;<br>&gt; Thanks for helping out !<br>&gt;<br>&gt; Steven<br>&gt;
<br>
&gt; On Nov 19, 2007 2:21 PM, Jørn Vegard Røsnes &lt;<a href="mailto:jorn@spacetec.no" target="_blank">jorn@spacetec.no</a>&gt; wrote:<br>&gt; &gt; Hi,<br>&gt; &gt;<br>&gt; &gt; do you have a column named oid with integer type in your table?
<br>&gt; &gt;<br>&gt; &gt; cheers<br>&gt; &gt; Jørn Vegard<br>&gt; &gt;<br>&gt; &gt; On Monday 19 November 2007 09:48, Steven De Vriendt wrote:<br>&gt; &gt; &gt; Hi folks,<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; I&#39;m trying to query a postgis-layer through wms. Yet, I do not get any
<br>&gt; &gt; &gt; query results.<br>&gt; &gt; &gt; Can anyone have a look at my mapfile. I have tried to label my features<br>&gt; &gt; &gt; too, using<br>&gt; &gt; &gt; a field of the postgis-table, but that doesn&#39;t seem to work too. So, my
<br>&gt; &gt; &gt; guess it should<br>&gt; &gt; &gt; be something wrong in my map-file. Thanks for helping out !<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; #<br>&gt; &gt; &gt; # Start of map file<br>&gt; &gt; &gt; #<br>&gt; &gt; &gt; # Sample map file for a chameleon app.
<br>&gt; &gt; &gt; #<br>&gt; &gt; &gt; NAME DEMO<br>&gt; &gt; &gt; STATUS ON<br>&gt; &gt; &gt; SIZE 600 500<br>&gt; &gt; &gt; SYMBOLSET symbols.sym<br>&gt; &gt; &gt; EXTENT 77336.359625 189988.500250 90937.297125 201812.968625

<br>&gt; &gt; &gt; UNITS METERS<br>&gt; &gt; &gt; SHAPEPATH &quot;../data&quot;<br>&gt; &gt; &gt; IMAGECOLOR 255 255 255<br>&gt; &gt; &gt; FONTSET fonts.txt<br>&gt; &gt; &gt; TRANSPARENT FALSE<br>&gt; &gt; &gt;<br>&gt; &gt; &gt;
<br>&gt; &gt; &gt; WEB<br>&gt; &gt; &gt; &nbsp; IMAGEPATH &quot;etc/mapserver/tmp/ms_tmp&quot;<br>&gt; &gt; &gt; &nbsp; IMAGEURL &quot;/tmp/&quot;<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; &nbsp;METADATA<br>&gt; &gt; &gt; &nbsp; &quot;wms_title&quot; &quot;Aalter_WMS&quot;
<br>&gt; &gt; &gt; &nbsp; &quot;wms_onlineresource&quot; &quot;<br>&gt; &gt; &gt; &nbsp; &quot;wms_srs&quot; &quot;EPSG:31300&quot;<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; &nbsp;END<br>&gt; &gt; &gt; END<br>&gt; &gt; &gt;<br>&gt; &gt; &gt;
<br>
&gt; &gt; &gt; OUTPUTFORMAT<br>&gt; &gt; &gt; NAME png<br>&gt; &gt; &gt; DRIVER &quot;GD/PNG&quot;<br>&gt; &gt; &gt; MIMETYPE &quot;image/png&quot;<br>&gt; &gt; &gt; IMAGEMODE PC256<br>&gt; &gt; &gt; EXTENSION &quot;png&quot;
<br>&gt; &gt; &gt; END<br>&gt; &gt; &gt;<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; SCALEBAR<br>&gt; &gt; &gt; &nbsp; IMAGECOLOR 255 255 255<br>&gt; &gt; &gt; &nbsp; LABEL<br>&gt; &gt; &gt; &nbsp; &nbsp; COLOR 0 0 0<br>&gt; &gt; &gt; &nbsp; &nbsp; SIZE SMALL
<br>&gt; &gt; &gt; &nbsp; END<br>&gt; &gt; &gt; &nbsp; SIZE 150 5<br>&gt; &gt; &gt; &nbsp; COLOR 255 255 255<br>&gt; &gt; &gt; &nbsp; BACKGROUNDCOLOR 0 0 0<br>&gt; &gt; &gt; &nbsp; OUTLINECOLOR 0 0 0<br>&gt; &gt; &gt; &nbsp; UNITS meters<br>&gt; &gt; &gt; &nbsp; INTERVALS 5
<br>&gt; &gt; &gt; &nbsp; STATUS ON<br>&gt; &gt; &gt; END<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; QUERYMAP<br>&gt; &gt; &gt; &nbsp; STATUS ON<br>&gt; &gt; &gt; &nbsp; SIZE 200 200<br>&gt; &gt; &gt; &nbsp; STYLE HILITE<br>&gt; &gt; &gt; &nbsp; COLOR 255 0 0
<br>&gt; &gt; &gt; END<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; PROJECTION<br>&gt; &gt; &gt; &nbsp; &nbsp; &quot;init=epsg:31300&quot;<br>&gt; &gt; &gt; END<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; LAYER<br>&gt; &gt; &gt; &nbsp; &nbsp;NAME &quot;Grens&quot;
<br>&gt; &gt; &gt; &nbsp; &nbsp;METADATA<br>&gt; &gt; &gt; &nbsp; &nbsp; &nbsp;&quot;wms_title&quot; &quot;gemeentegrens&quot;<br>&gt; &gt; &gt; &nbsp; &nbsp; &nbsp;&quot;gml_include_items&quot; &quot;all&quot;<br>&gt; &gt; &gt; &nbsp; &nbsp;END<br>&gt; &gt; &gt; &nbsp; &nbsp;CONNECTIONTYPE postgis
<br>&gt; &gt; &gt; &nbsp; &nbsp;CONNECTION &quot;host=&quot;&quot;<br>&gt; &gt; &gt; &nbsp; &nbsp;DATA &quot;the_geom from alr_gemline&quot;<br>&gt; &gt; &gt; &nbsp; &nbsp;DUMP TRUE<br>&gt; &gt; &gt; &nbsp; &nbsp;TEMPLATE &quot;ttt&quot;<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; &nbsp; &nbsp;TYPE LINE
<br>&gt; &gt; &gt; &nbsp; &nbsp; CLASS<br>&gt; &gt; &gt; &nbsp; &nbsp; NAME &quot;KadScan&quot;<br>&gt; &gt; &gt; &nbsp; &nbsp; OUTLINECOLOR 208 208 208<br>&gt; &gt; &gt; &nbsp; END<br>&gt; &gt; &gt; &nbsp; &nbsp; PROJECTION<br>&gt; &gt; &gt; &nbsp; &nbsp; &quot;init=epsg:31300&quot;
<br>&gt; &gt; &gt; &nbsp; &nbsp; END<br>&gt; &gt; &gt; END<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; &nbsp; &nbsp;LAYER<br>&gt; &gt; &gt; &nbsp; &nbsp;NAME &quot;Percelen&quot;<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; &nbsp; &nbsp;CONNECTIONTYPE postgis<br>&gt; &gt; &gt; &nbsp; &nbsp;CONNECTION &quot;host=&quot;&quot; &lt;
<a href="http://192.168.102.100/" target="_blank">http://192.168.102.100/</a>&gt;<br>&gt; &gt; &gt; &nbsp; &nbsp;DATA &quot;the_geom from b_capa_percid&quot;<br>&gt; &gt; &gt; &nbsp; &nbsp;TEMPLATE &quot;ttt&quot;<br>&gt; &gt; &gt; &nbsp; &nbsp;LABELITEM &#39;capakey&#39;
<br>&gt; &gt; &gt; &nbsp; TYPE POLYGON<br>&gt; &gt; &gt; &nbsp; &nbsp; CLASS<br>&gt; &gt; &gt; &nbsp; &nbsp; NAME &quot;KadScan&quot;<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; &nbsp; &nbsp; OUTLINECOLOR 208 208 208<br>&gt; &gt; &gt; &nbsp; END<br>&gt; &gt; &gt; &nbsp; &nbsp; METADATA
<br>&gt; &gt; &gt; &nbsp; &nbsp; &nbsp;&quot;wms_title&quot; &quot;percelen&quot;<br>&gt; &gt; &gt; &nbsp; &nbsp; &nbsp;&quot;gml_include_items&quot; &quot;all&quot;<br>&gt; &gt; &gt; &nbsp; &nbsp;END<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; &nbsp; &nbsp; PROJECTION<br>&gt; &gt; &gt; &nbsp; &nbsp; &quot;init=epsg:31300&quot;
<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; &nbsp; &nbsp;END<br>&gt; &gt; &gt; END<br>&gt; &gt; &gt;<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; END # Map File<br></div></div></blockquote></div><br>