WFS Filter Oracle

Bart van den Eijnden (OSGIS) bartvde at OSGIS.NL
Tue Apr 24 14:04:23 EDT 2007


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



More information about the mapserver-users mailing list