Solved

SQL Server Full Text Search - AND searches across multiple columns

Posted on 2010-11-24
1
427 Views
Last Modified: 2012-06-21
Does anyone know how to accomplish this?  The search below only returns results when a specific column matches both words.  I want it to match if all words are matched, but in any full-text indexed column.  Anyone know if this is do-able?

DECLARE @keywords nvarchar(100);
SET @keywords = '"William*" AND "Travis*"';

SELECT RANK AS RES_RANK, * FROM VW_REQUESTOR_AGENCY_SEARCH,
CONTAINSTABLE (VW_REQUESTOR_AGENCY_SEARCH, *,  @keywords) AS TBL_SCH
WHERE [KEY] = VW_REQUESTOR_AGENCY_SEARCH.REQUESTOR_ID

Open in new window

0
Comment
Question by:msdcdev
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 1

Accepted Solution

by:
msdcdev earned 0 total points
ID: 34209643
According to several articles, the answer is to add a computed column on the view that concatenates all of the fields that you want to search.  Then, change your full text index to only include the computed column.  Then the query shown above works with no changes.
0

Featured Post

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Naughty Me. While I was changing the database name from DB1 to DB_PROD1 (yep it's not real database name ^v^), I changed the database name and notified my application fellows that I did it. They turn on the application, and everything is working. A …
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

630 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question