<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2912" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Thanks Aaron, I choose option number 2 and included
a JOIN statement like this:</FONT></DIV>
<DIV><FONT size=2>
<P>DATA "posicion from (select loca.cmpoid, loca.mo, loca.posicion, autos.placas
as placa from loca inner join autos on loca.idunit = autos.idunit where %uad%)
as foo using unique cmpoid using srid=4326"</P>
<P>the %uad% is for filtering purposes.</P></FONT></DIV>
<DIV><FONT face=Arial size=2>works OK</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Regards,</FONT></DIV>
<DIV><FONT face=Arial size=2>Luis</FONT></DIV>
<DIV>----- Original Message ----- </DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=aaronkoning@GMAIL.COM href="mailto:aaronkoning@GMAIL.COM">Aaron
Koning</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A
title=MAPSERVER-USERS@LISTS.UMN.EDU
href="mailto:MAPSERVER-USERS@LISTS.UMN.EDU">MAPSERVER-USERS@LISTS.UMN.EDU</A>
</DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Monday, June 19, 2006 3:24 PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> Re: [UMN_MAPSERVER-USERS] How
can I label a Point using different postgis table</DIV>
<DIV><BR></DIV>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> 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> <<A
href="mailto:ltrevino@gpobsi.com.mx">ltrevino@gpobsi.com.mx</A>>
wrote:</SPAN>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">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 "loca". 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 "autos"), both tables share a
common column named "idunit" 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> NAME gis <BR> STATUS
ON<BR> TYPE POINT<BR> UNITS
METERS<BR><BR> DEBUG ON<BR> CONNECTION "user=XXX
password=XXXXX dbname=bsiubica
host=XXX.XXX.XXX.XX<BR>port=5432"<BR> CONNECTIONTYPE
postgis<BR> DATA "posicion from loca as foo using unique cmpoid
using srid=4326" <BR><BR>
PROJECTION<BR> "proj=longlat"<BR> "ellps=WGS84"<BR>
"datum=WGS84"<BR> END<BR><BR> FILTER 'idunit =
%unid%'<BR><BR> CLASS<BR> EXPRESSION
('[mo]' = '1')<BR> COLOR 255 255
26 #amarillo <BR> SYMBOL
7<BR> SIZE 13<BR>
END<BR>END<BR><BR>regards,<BR>Luis<BR></BLOCKQUOTE></DIV><BR><BR
clear=all><BR>--
<BR>+--------------------------------------------<BR>| Aaron
Koning<BR>| Information Technologist <BR>| Prince
George, BC,
Canada.<BR>+--------------------------------------------<BR>| <A
href="http://datashare.gis.unbc.ca/fist/">http://datashare.gis.unbc.ca/fist/</A><BR>| <A
href="http://datashare.gis.unbc.ca/gctp-js/">
http://datashare.gis.unbc.ca/gctp-js/</A><BR>+--------------------------------------------
</BLOCKQUOTE></BODY></HTML>