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

Robert Sanson SansonR at asurequality.com
Sun Sep 28 23:03:16 EDT 2008


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20080929/601099e4/attachment.html


More information about the mapserver-users mailing list