August 3, 2016 at 2:31 pm
I have a table called Resume with columns in Text, Word and PDF format. I enabled Full Text Search on the table and able to search the keyword through three columns and also able to rank the profile according to the keyword search .. Used below query snippet for the same:
SELECT ct., ct.[RANK], br.ProfileID ,br.TextVersion, k.KeyWordName
FROM CONTAINSTABLE( dbo.tblResumeTag, TextVersion , @SearchPhrase) as ct
INNER JOIN dbo.tblResumeTag
ON ct. = br.ID
INNER JOIN dbo.tblKeywords k
ON br.TextVersion LIKE '%' + k.KeyWordName + '%'
AND k.KeyWordName LIKE '%' + @SearchPhrase + '%'
ORDER BY ct.[RANK] DESC
Now I want show the occurence(Count ) of the @search phrase in Textversion col, which I am struggling to return the exact count. Any suggestions will be helpful.
Thank you
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply