Friday, 9 August 2013

How to search for a whole word with special char using oracle contains?

How to search for a whole word with special char using oracle contains?

I have a column short_desc in my table that is context indexed.
When i search like below
select * from table1 where CONTAINS (short_desc,'{product\_id}') > 0
I get results like
abc product_id
abc product id
The escaped character behaves like an OR and the query searches for
'product_id' or 'product id'
How can i search for the whole word 'product_id' only?
Thanks in advance

No comments:

Post a Comment