472,119 Members | 978 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,119 software developers and data experts.

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 1668

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

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.