Skip to Main Content

How to find exact string with contains operator

3793821Sep 24 2018 — edited Oct 2 2018

Hi,

I am new to oracle text feature,so please be help me to resolve below issue.

I have one table which has one CLOB column,CONTEXT indext type created on that same column.

For example consider CLOB column has some text phrases as below ,

row1:Blah-blah, grave_driveway_in,blah_blah

row2:Blah_blah,grave_driveway,blah_blah

Now  i need to return only the row1 which has string "grave_driveway_in",it shouldn't return row2 which has string "grave_driveway"  i used below query

select * from table_name where contains(col1,'{grave\_driveway\_in%}',1) >0;

but this query returning both the rows, can someone Please suggest how to bring the query to return only the row1 which has "grave_driveway_in".

Regexp_like and INSTR not recommended as its consuming time.

Thanks in advance.

Comments
Post Details
Added on Sep 24 2018
4 comments
3,187 views