2012年3月21日星期三

Full text search - ends with option

I am implementing full text serach option in my project.

Its working fine for Begins with ("Text*")

Contains("Text")

But I am not able get the results for ends with ("*Text")

SELECT * FROM CATALOGUE_INDEX WHERE CONTAINS(SHORT_DESCRIPTION,'*OCK')

Now I am expecting the rows which are having "Stock" as value in short_desciption column.

But I am not getting the result.

Please advise me on how to do the same

Regards

Muralimohan

SQL Server doesn't support leading wildcards in FullText search. Therefore your first query will be searching on "ock" only explaining why no results are returned.

The only way to get round this as far as i know is to use the LIKE keyword.

sql

没有评论:

发表评论