SQL Server Full Text Search Leading Wildcard
Posted
by aherrick
on Stack Overflow
See other posts from Stack Overflow
or by aherrick
Published on 2010-04-18T23:13:37Z
Indexed on
2010/04/18
23:23 UTC
Read the original article
Hit count: 343
After taking a look at this SO question and doing my own research, it appears that you cannot have a leading wildcard while using full text search.
So in the most simple example, if I have a Table with 1 column like below:
TABLE1
coin
coinage
undercoin
select COLUMN1 from TABLE1 where COLUMN1 LIKE '%coin%'
Would get me the results I want.
How can I get the exact same results with FULL TEXT SEARCH enabled on the column?
The following two queries return the exact same data, which is not exactly what I want.
SELECT COLUMN1 FROM TABLE1 WHERE CONTAINS(COLUMN1, '"coin*"')
SELECT COLUMN1 FROM TABLE1 WHERE CONTAINS(COLUMN1, '"*coin*"')
© Stack Overflow or respective owner