<p class="MsoNormal"><span style="font-size:12.0pt;line-height:115%">Hi Andy, </span></p><p class="MsoNormal"><span style="font-size:12.0pt;line-height:115%"><br></span></p>

<p class="MsoNormal"><span style="font-size:12.0pt;line-height:115%">My postgis
version check returns POSTGIS="1.5.3" I found from </span><span style="font-size:12pt;line-height:115%;font-family:Arial,sans-serif;background-image:initial;background-color:white;background-repeat:initial initial">SELECT PostGIS_version();</span></p>


<p class="MsoNormal"><span style="font-size:12pt;line-height:115%;font-family:Arial,sans-serif;background-image:initial;background-color:white;background-repeat:initial initial"><br></span></p><p class="MsoNormal"><span style="font-size:12pt;line-height:115%;font-family:Arial,sans-serif;background-image:initial;background-color:white;background-repeat:initial initial">I think what you have
provided make sense with what I am trying to do.  Essentially, I have a table of polygons with
a primary key pt_id.  And I have another
table of just data values with the foreign key pt_id corresponding to polygons
primary key.  Also, on the data table are
the string values called agents. </span></p><p class="MsoNormal"><span style="font-size:12pt;line-height:115%;font-family:Arial,sans-serif;background-image:initial;background-color:white;background-repeat:initial initial"><br>
</span></p><p class="MsoNormal"><span style="font-size:12pt;line-height:115%;font-family:Arial,sans-serif;background-image:initial;background-color:white;background-repeat:initial initial">Essentially, we
have a flex application that uses and identify function and we are trying to
return the one-to-many agents per polygon. I think this answers Ben's questions.</span></p>

<p class="MsoNormal"><span style="font-size:12pt;line-height:115%;font-family:Arial,sans-serif;background-image:initial;background-color:white;background-repeat:initial initial"><br></span></p><p class="MsoNormal"><span style="font-size:12pt;line-height:115%;font-family:Arial,sans-serif;background-image:initial;background-color:white;background-repeat:initial initial">Thanks for your feedback guys.
</span></p>

<p class="MsoNormal"><span style="font-size:12pt;line-height:115%;font-family:Arial,sans-serif;background-image:initial;background-color:white;background-repeat:initial initial">Derek</span><span style="font-size:12.0pt;line-height:115%"></span></p>
<br><div class="gmail_quote">On Mon, Jan 30, 2012 at 10:54 PM, Andy Colson <span dir="ltr"><<a href="mailto:andy@squeakycode.net">andy@squeakycode.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5">On 01/30/2012 09:00 PM, John Morgan wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello,<br>
I am attempting to get a one (polys) to many (table) to load postgis data within a mapserver wms.  I have the following defined in the .map file.<br>
<br>
DATA "the_geom FROM (SELECT polys.gid AS gid, polys.the_g<br>
eom AS the_geom, table.pt_id AS pt_id, table.agent AS agent FROM polys RIGHT OUTER JOIN<br>
table ON polys.pt_id = table.pt_id) as new_table USING UNIQUE gid USING SRID=4326"<br>
<br>
It does load, the layer, however, it doesn't seem to be performing the one-to-many for the attributes on identify.  Thanks for any feedback.<br>
<br>
Cheers,<br>
Derek<br>
<br>
</blockquote>
<br></div></div>
But.... that would return the exact same the_geom multiple times.  Which would draw all on top of each other (including the label?), so it would only look like one.<br>
<br>
What is it you are trying to do?  Looks like get all the agent's to display for one area?<br>
If you are using PG 9, how about something like:<br>
<br>
DATA "the_geom FROM (SELECT polys.gid AS gid, polys.the_geom AS the_geom, (select string_agg(agent, E'\n') from table where polys.pt_id = table.pt_id) AS agents FROM polys) as new_table USING UNIQUE gid USING SRID=4326"<br>

<br>
That'll return all the agents in a single string separated by carage return.<span class="HOEnZb"><font color="#888888"><br>
<br>
-Andy<br>
</font></span></blockquote></div><br>