Fulltext - How to get a word hitcount
Saw this on the newsgroups and thought it was really neat. To get the number of times a word occurs in a column you can do
SELECT PKCol,
hitcount=(len(TextCol)-len(replace(TextCol,'WordToFind','')) )/len('WordToFind')
FROM myTable
WHERE CONTAINS (TextCol, 'WordToFind')
I also saw another solution using a CTE but I think this has a better performance
-