SOLVED:

Thanks everybody.  Julian's p.s. addition seems to have done the trick
(using the oid/gid instead of the_geom), or at least in combination with
'select *'... here's the full query that finally worked:

    DATA "the_geom from (select * from shp_prct) as foo using unique gid
using SRID=-1"

Thanks again to everybody,
Matt

On Tue, 12 Feb 2008 13:16:26 -0600, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:

>Hi,
>
>Yep, I changed to the "select * ..." syntax, but still have the same problem...
>
>thanks,
>Matt
>
>On Tue, 12 Feb 2008 08:59:24 -0800, Brent Pedersen <[EMAIL PROTECTED]> wrote:
>
>>hi, i think you need something like:
>>DATA "the_geom from (select * from shp_prct) as foo using unique
>>the_geom using SRID=-1"
>>
>>so you get the other attributes, in addition to the_geom
>>
>>On Feb 12, 2008 8:52 AM, [EMAIL PROTECTED]
>><[EMAIL PROTECTED]> wrote:
>>> Hi,
>>>
>>> A while back, I posted a question like this to the group, and got an answer
>>> that worked for me:
>>>
>>>
>http://lists.umn.edu/cgi-bin/wa?A2=ind0705&L=mapserver-users&amp;D=0&O=D&T=0&P=5373
>>>
>>> I was able to get correct results by making a simple query.  Now, however, I
>>> need to use a more complex query to return results.
>>>
>>> The problem is this... I have a template and a map file with a layer that
>>> uses that template.  When the DATA attribute is:
>>>
>>>     DATA "the_geom from shp_prct"
>>>
>>> the query works fine and i get my template back appropriately filled out.
>>> When I use the more complex but equivalent formulation:
>>>
>>>     DATA "the_geom from (select the_geom from shp_prct) as foo using unique
>>> the_geom using SRID=-1"
>>>
>>> The result is the following:
>>>
>>>     Content-type: text/html
>>>
>>>
>>>     <HTML>
>>>     <HEAD><TITLE>MapServer Message</TITLE></HEAD>
>>>
>>>     <!-- MapServer version 5.0.0 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG
>>> OUTPUT=WBMP OUTPUT=PDF OUTPUT=SWF OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=AGG
>>> SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT
>>> SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER
>>> SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS SUPPORTS=GEOS
>>> INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE -->
>>>
>>>     <BODY BGCOLOR="#FFFFFF">
>>>     </BODY></HTML>
>>>
>>>
>>> Just to note, the query I really need isn't the second one verbatim, but
>>> uses the form of "select the geom from (<query>) as foo ...".
>>>
>>> I'm omitting the rest of the info assuming it isn't important at this time,
>>> but will supply it if someone thinks that it is key to solving this...
>>>
>>> Any ideas?
>>>
>>> Thanks,
>>> Matt
>>>

Reply via email to