Opened 17 years ago

Closed 17 years ago

#2075 closed defect (fixed)

problem with filiet islike and oracle

Reported by: Assefa Owned by: Assefa
Priority: normal Milestone: 5.0 release
Component: WFS Server Version: 5.0
Severity: normal Keywords:
Cc:

Description

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?

Change History (3)

comment:1 by Assefa, 17 years ago

Owner: changed from mapserverbugs to Assefa
Status: newassigned

comment:2 by Assefa, 17 years ago

e-mail from Bart :

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?

comment:3 by assefa, 17 years ago

Resolution: fixed
Status: assignedclosed

fixed in cvs : ilike only valid for postgis layers.

Note: See TracTickets for help on using tickets.