[mapserver-users] Variable substitution in FILTER request with a LIKE

Robert Sanson SansonR at asurequality.com
Mon Sep 29 13:09:17 PDT 2008


Thanks Steve - Works perfectly!
 
Robert

>>> "Steve Lime" <Steve.Lime at dnr.state.mn.us> 30/09/2008 6:02 a.m. >>>
FILTER "WHERE NAME LIKE '%%road%%'" won't work? MapServer should just replace the inner %road% and
leave the outer %'s alone.

Steve


>>> On 9/28/2008 at 10:03 PM, in message <48E0FC44.379F.0037.0 at asurequality.com>,
"Robert Sanson" <SansonR at asurequality.com> wrote:
> I would like to have a FILTER section in my layer definition of an ArcSDE 
> layer where I formulate a "WHERE NAME LIKE ...". The problem is, is that 
> Mapserver defines variables using %variable%, and the "%" is also used as a 
> wild card in SQL-Server, which is what we use for SDE.
> 
>  
> 
> The Layer defition is:
> 
>  
> 
> LAYER
> 
>   NAME road
> 
>   TYPE LINE
> 
>   UNITS METERS
> 
>   STATUS ON
> 
>   CONNECTIONTYPE SDE
> 
>   CONNECTIONTYPE PLUGIN
> 
>   CONNECTION "esri-arcsde,port:nnnn,sde_crs,user,passwd"
> 
>   PLUGIN "c:/ms4w/apache/specialplugins/msplugin_sde_91.dll"
> 
>   DATA "sde_crs.SDEADMIN.CRS_ROAD,SHAPE"
> 
>   FILTER "WHERE NAME LIKE '%" + %road% + "%'"
> 
>  
> 
>   # data is queryable
> 
>   DUMP TRUE
> 
>  
> 
> Is there any solution to this?
> 
>  
> 
> Many thanks,
> 
>  
> 
> Robert Sanson
> 
> ------------------------------------------------------------------
> 
> The contents of this email are confidential to AsureQuality. If you have 
> received this communication in error please notify the sender immediately and 
> delete the message and any attachments. The opinions expressed in this email 
> are not necessarily those of AsureQuality. This message has been scanned for 
> known viruses before delivery. AsureQuality supports the Unsolicited 
> Electronic Messages Act 2007. If you do not wish to receive similar 
> communications in future, please notify the sender of this message.
> 
> ------------------------------------------------------------------
> 
> 
> 
> This message has been scanned for malware by SurfControl plc. 
> www.surfcontrol.com 


------------------------------------------------------------------
The contents of this email are confidential to AsureQuality. If you have received this communication in error please notify the sender immediately and delete the message and any attachments. The opinions expressed in this email are not necessarily those of AsureQuality. This message has been scanned for known viruses before delivery. AsureQuality supports the Unsolicited Electronic Messages Act 2007. If you do not wish to receive similar communications in future, please notify the sender of this message.
------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20080930/e5666b11/attachment.htm>


More information about the MapServer-users mailing list