[mapserver-users] Variable substitution in FILTER request with aLIKE

Steve Lime Steve.Lime at dnr.state.mn.us
Mon Sep 29 10:02:15 PDT 2008


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




More information about the MapServer-users mailing list