Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I have a search like the example below. The problem is that the result returns a key muliple times if the term "beach" is in myTextColumn multiple times, for example "I went to the beach because the beach is cool". I need it to be returned only once.

  SELECT DISTINCT          
    Src.[Key] AS MyID
FROM            
    CONTAINSTABLE(MyTable, myTextColumn, N'FORMSOF(INFLECTIONAL,beach )',500) Src
ORDER BY 
    MyID
share|improve this question
    
Which db is this? –  Chris Aldrich Jul 30 '12 at 19:04
    
The database server is Microsoft SQL 2005 –  Adam Mendoza Jul 30 '12 at 19:08
    
This is the answer but I'm not allowed to answer my own question. It turns out that the problem was cause by a bad full text search index. It had to be rebuild with do not track changes, and the correct word breaker for the given language. –  Adam Mendoza Jul 31 '12 at 0:15
    
I believe you can answer your own question. You just cannot mark it as an answer for two days. Try it, if not, we can always ping the moderators. –  Chris Aldrich Jul 31 '12 at 12:41
add comment

1 Answer

up vote 0 down vote accepted

It turns out that the problem was cause by a bad full text search index. It had to be rebuild with do not track changes, and the correct word breaker for the given language.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.