I'm running a TSQL query that uses a CONTAINSTABLE-statement like this one
CONTAINSTABLE(<Table A>, <TargetColumn>, '01100011')
which gives me the correct results. However, If I use
CONTAINSTABLE(<Table A>, <TargetColumn>, '0110001*')
instead, I get 0 result. Can someone please explain to my why ? AFAIK wildcards are supported like this.
This is on MSSQL Server 2008R2
Thanks in advance :-)
As per Jeroen's comment, you need to surround your search term with double quotes (within the single quotes).
The documentation gives the example
CONTAINS (Description, '"top*"' )then saysIn your case,
CONTAINSTABLE(<Table A>, <TargetColumn>, '"0110001*"')should work as you expected.