Reputation: 2154
I want to use SQL SERVER 2008 Full text search to get the records that have a word or a phrase as the whole text within the field and not as part of the text within the field. For example: I have many records containing the Word 'Inheritance' as the whole text in the field and other fields containing the same word in between,at the beginning, and at the end of the text within the field. I want to get only the records containing the 'Inheritance' word as the whole text in the record.
Thank you.
Upvotes: 0
Views: 768
Reputation: 243
According to the documentation this should work,
WHERE CONTAINS(thefield, '"Inheritance*" AND NOT "Inheritance *"');
Couldn't test it here since we don't have any full text search enabled databases.
Upvotes: 0
Reputation: 490128
If you just want the rows in which a particular field exactly matches a specified string, you don't need to use full-text searching at all, just a normal SQL query:
select * from the_table where the_field = 'inheritance'
Upvotes: 2