I'm having an issue querying a table using a context index, when there is an ampersand in the contains section of the where clause. For example
returns a lot more than I'd expect. But if I do this
I get the results I expect. Do you know why? Is there a better solution than adding the second line to there where clause? It works the second way, so I can use it. I would prefer to fix the problem instead of work around it. The original query works fine if the string being compared doesn't contain an ampersand. For example
returns the same results as
Any suggestions would be appreciated. Thanks.
-----------------------------------------
I cannot be bought. Find leasing information at
Code:
SELECT inventory_item_id, keyword
FROM item_keywords
WHERE contains (keyword, 'AT' || chr(38) || 'T') > 0;
Code:
SELECT inventory_item_id, keyword
FROM item_keywords
WHERE contains (keyword, 'AT' || chr(38) || 'T') > 0
and keyword like '%AT' ||chr(38)|| 'T%';
Code:
SELECT inventory_item_id, keyword
FROM item_keywords
WHERE contains (keyword, '3COM') > 0;
Code:
SELECT inventory_item_id, keyword
FROM item_keywords
WHERE contains (keyword, '3COM') > 0
and keyword like '%3COM%';
-----------------------------------------
I cannot be bought. Find leasing information at