WFS Filter Oracle

Yewondwossen Assefa assefa at DMSOLUTIONS.CA
Tue Apr 24 11:45:34 PDT 2007


There is ticket on this : http://trac.osgeo.org/mapserver/ticket/2075. I 
have fixed the ilike  to be only done for postgis layers. I will wait 
for Sture answer to see if something has to be done for the escape 
statement.

Later,



Bart van den Eijnden (OSGIS) wrote:
> Hi Sture,
> 
> if you leave out matchCase='false' in your filter ilike will turn into like.
> But you should file a bug about this, since ilike is for PostgreSQL. But at
> least you've got a workaround for now.
> 
> I believe there is nothing wrong with escape '!', it should be there in case
> someone wants to escape a character in the search string. Does it not run in
> sqlplus? If so, what error do you get?
> 
> Best regards,
> Bart
> 
> Hello
> 
> I've been testing ORACLE 10g Locator and Mapserver. There seem to be an
> issue when using WFS "PropertyIsLike" filter on an ORACLE 10g Locator layer.
> 
> My WFS URL is like this:
> http://test/cgi-bin/mapserv.exe?map=wfs.map&SERVICE=WFS&VERSION=1.0.0&REQUEST=getfeature&MAXFEATURES=100&TYPENAME=layer_20&FILTER=<Filter><PropertyIsLike
> wildcard='*' singleChar='.' escape='!'
> matchCase='false'><PropertyName>KOMMUNE</PropertyName><Literal>*123456*</Literal></PropertyIsLike></Filter>
> 
> Mapserver the produces this SQL (based on WFS filter):
> SELECT ID, GEOM FROM (SELECT * FROM V_BE) WHERE KOMMUNE ilike '123456'
> escape '!' AND SDO_FILTER( GEOM, MDSYS.SDO_GEOMETRY(2003, 32632,
> NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3),MDSYS.SDO_ORDINATE_ARRAY(-26932.706,6387567.41,1637291.63,8050226.99)
> ),'querytype=window') = 'TRUE' 
> 
> In the SQL there are some errors: 
> "ilike '123456'" should be "like '123456'"
> escape '!' should not be present at all
> 
> Could this be a bug or is there something wrong with my WFS filter URL?
> 
> Cheers!
> Sture
> --
> Bart van den Eijnden
> OSGIS, Open Source GIS
> http://www.osgis.nl
> 


-- 
----------------------------------------------------------------
Assefa Yewondwossen
Software Analyst

Email: assefa at dmsolutions.ca
http://www.dmsolutions.ca/

Phone: (613) 565-5056 (ext 14)
Fax:   (613) 565-0925
----------------------------------------------------------------



More information about the MapServer-users mailing list