I believe you have two options here:<br><br>1. Create a database view that joins the two tables and set your DATA variable to that view.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OR<br>2. Modify the DATA variable to include a JOIN statement.<br><br>Aaron
<br><br><div><span class="gmail_quote">On 6/19/06, <b class="gmail_sendername">Luis Treviņo Huerta</b> &lt;<a href="mailto:ltrevino@gpobsi.com.mx">ltrevino@gpobsi.com.mx</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi list:<br><br>I'm currenttly using a point layer that displays some GPS points that are<br>stored on a postgis table called &quot;loca&quot;. I'd like to label this points with<br>data that comes from another table in the same postgis data base (this table
<br>is named &quot;autos&quot;), both tables share a common column named &quot;idunit&quot; and I<br>would like to use autos.idunit as a label. How can I do this?. This is part<br>of my map file:<br><br> LAYER<br>&nbsp;&nbsp; NAME gis
<br>&nbsp;&nbsp; STATUS ON<br>&nbsp;&nbsp; TYPE POINT<br>&nbsp;&nbsp; UNITS METERS<br><br>&nbsp;&nbsp; DEBUG ON<br>&nbsp;&nbsp; CONNECTION &quot;user=XXX password=XXXXX dbname=bsiubica host=XXX.XXX.XXX.XX<br>port=5432&quot;<br>&nbsp;&nbsp; CONNECTIONTYPE postgis<br>&nbsp;&nbsp; DATA &quot;posicion from loca as foo using unique cmpoid using srid=4326&quot;
<br><br>&nbsp;&nbsp; PROJECTION<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;proj=longlat&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;ellps=WGS84&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp; &quot;datum=WGS84&quot;<br>&nbsp;&nbsp; END<br><br>&nbsp;&nbsp;FILTER 'idunit = %unid%'<br><br>&nbsp;&nbsp; CLASS<br>&nbsp;&nbsp;&nbsp;&nbsp; EXPRESSION ('[mo]' = '1')<br>&nbsp;&nbsp;&nbsp;&nbsp; COLOR 255 255 26&nbsp;&nbsp;#amarillo
<br>&nbsp;&nbsp;&nbsp;&nbsp; SYMBOL 7<br>&nbsp;&nbsp;&nbsp;&nbsp; SIZE 13<br>&nbsp;&nbsp; END<br>END<br><br>regards,<br>Luis<br></blockquote></div><br><br clear="all"><br>-- <br>+--------------------------------------------<br>|&nbsp;&nbsp;Aaron Koning<br>|&nbsp;&nbsp;Information Technologist
<br>|&nbsp;&nbsp;Prince George, BC, Canada.<br>+--------------------------------------------<br>|&nbsp;&nbsp;<a href="http://datashare.gis.unbc.ca/fist/">http://datashare.gis.unbc.ca/fist/</a><br>|&nbsp;&nbsp;<a href="http://datashare.gis.unbc.ca/gctp-js/">
http://datashare.gis.unbc.ca/gctp-js/</a><br>+--------------------------------------------