469,904 Members | 1,921 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,904 developers. It's quick & easy.

MSSQL Full text search question

Hi

I am trying to do a full text search with a column name for the search term.
I can do this using LIKE with:

Expand|Select|Wrap|Line Numbers
  1. SELECT tblContent.ID FROM tblContent INNER JOIN #keywords ON  tblContent.words LIKE '%' + #keywords.keyword + '%'
But I can not seem to do this using the CONTAINS syntax.
eg.

Expand|Select|Wrap|Line Numbers
  1. SELECT tblContent.ID FROM tblContent, #keywords WHERE CONTAINS(words,#keywords.keyword)
The reason I am trying to do this is because my final search result must contain all the words in the search phrase, even if they are not next to each other. (The search involves fields across multiple tables.) To achieve this I have split the search phrase into a temporary table. Then once all the possible tables/columns have been searched and appended to another temporary table I can remove the results that have not scored for all the words in the search phrase. I was trying to speed the process up with full text search.

I also thought there might be a way of doing this using CONTAINSTABLE rank, but I can not see how.

Any help would be much appreciated.
Mar 11 '08 #1
0 1569

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

7 posts views Thread by Mark Knochen | last post: by
1 post views Thread by Waqarahmed | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.