x

Full text search using a table column as input criteria?

I am trying to use a full text index (already created and working fine) to search a column using another table as input. I've been trying to use CONTAINS to do this and ideally I would be able to JOIN on CONTAINS to accomplish this, but that doesn't work.

I know this doesn't work, but may help you understand what I'm trying to do:


select sku, type  from dbo.Product_search ps                    
INNER JOIN dbo.Product_Location_Universities plu on contains(searchValue, plu.SearchText)                    

The reason I'm doing this is that the criteria table (dbo.Product_Location_Universities) is about 5,000 records, charindex works but is too slow, and I was hoping to leverage the existing index.

more ▼

asked Jul 08, 2010 at 12:35 PM in Default

Mark Evans gravatar image

Mark Evans
1 1 1 1

(comments are locked)
10|1200 characters needed characters left

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

New code box

There's a new way to format code on the site - the red speech bubble logo will automatically format T-SQL for you. The original code box is still there for XML, etc. More details here.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.

Topics:

x46

asked: Jul 08, 2010 at 12:35 PM

Seen: 709 times

Last Updated: Jul 08, 2010 at 12:35 PM