Reputation: 89
I am trying to search from table using keywords and it works fine when I do not use wildcards.
CONTAINS(CP.Course, '"B.A" OR "B.E/B.Tech"')
But it does not shows any records when I use this:
CONTAINS(CP.Course, '"*B.A*" OR "*B.E/B.Tech*"')
Is there any reason for it? Since wild card is used as both prefix and suffix so any matching record should be shown. But it shows none.
Upvotes: 0
Views: 1023
Reputation: 376
SQL Server full-text search does not support search by prefix asterisk.
So, while "B.A*"
is a valid term, "*B.A*"
and "*B.A"
are not.
https://learn.microsoft.com/en-us/sql/t-sql/queries/contains-transact-sql
Upvotes: 1