Escape caracters in CONTAINS()
we're using Oracle 9i 9.1 and Apple's WebObjects together. One of our applications is using ConText indexes and we have small problems with this.
ConText seems to think that dashes are wildcards, for example, if we do:
SELECT * FROM TABLE WHERE CONTAINS (FIELD,'33-99%',0) > 0
instead of fetching any text that have 33-99 in it, it fetch anything with 33 in it. In pure SQL, I can escape the dash by putting a slash in front:
but WebObjects is stripping the slash so I still have the problem. So, finally, my question is: do you know of any other escape caracter that I can use instead of a slash ?
From the manual:
To search for employees with the pattern 'A_B' in their name:
WHERE ename LIKE '%A\_B%' ESCAPE '\';
So you should be able to use another escape like:
WHERE ename LIKE '%A#_B%' ESCAPE '#';
Ben de Boer
Click Here to Expand Forum to Full Width