Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to get data for exact word match - Please help

skvJan 7 2013 — edited Jan 8 2013
Hi,

I have created Oracle Text index on one column, say col2. I want to get the data that exactly match word in the given criteria (i.e., "P.A.C.") and I have written below two queries


SELECT col1, col2, col3
FROM table1
WHERE CONTAINS (col2, '{P.A.C.}') > 0;


SELECT col1, col2, col3
FROM table1
WHERE CONTAINS (col2, '{"P.A.C."}') > 0;


Above two queries are fetching same data like below. But I want only one record from below list, i.e., P.A.C. MEETING.


P/E RATIO
I/P SUMMARY
P. BRADFORD
P FALL
P.A.C. MEETING



Can you please help me how to achieve this. I am working on Oracle 11g.

Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 5 2013
Added on Jan 7 2013
3 comments
487 views