How to get data for exact word match - Please help
skvJan 7 2013 — edited Jan 8 2013Hi,
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