September 10, 2009 at 9:16 am
Hello all,
I have set up Full-Text Indexing on a customer table including field like Name, CompanyName, Email, PhoneNumber, and Address. I have tried different forms of CONTAINS and FREETEXT and cannot return what I am looking for. I could not get the query to return rows where the search condition was found in the middle of the string.
The query below will return these rows:
Bob Jones bobjones@test.com 111 Cardinal Rd
James Jones jjones@test.com 222 Bluebird Way
select Name, Email, Address
from dbo.Customers
where contains((Name, Email, Address), N'jones')
The query below will return no rows:
select Name, Email, Address
from dbo.Customers
where contains((Email, Address), N'jones')
How can I modify the query so that it finds "jones" in the middle of the email address?
Thanks for any help you can provide.
September 10, 2009 at 6:04 pm
Can you use a * either side of your expression?
September 11, 2009 at 6:58 am
I do actually use a "*" after the word and it returns more records which is correct. I have tried a "*" in front of the word but it appears as it is just ignored. I read that full-text searching does not support suffixes where as it does support prefixes.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply