开发者

Forward Search in FullText Search

I've implemented FullText Search using the CONTAINS clause provided by MS SQL.

If I search for 'Stac' then I get 'Stack' as a result. But if I search for 'tac' then the database doesn't return any result.

SELECT * FROM TEMPTABLE WHERE CONTAINS(ColumnDetails, '"*tac*"'). This doesn't work.

How can I make this possibl开发者_开发百科e?


You can use the LIKE operator which can be useful to you. Below is the link. LIKE

E.g.

SELECT *
FROM table_name
WHERE column_name LIKE '%AN%'

which would produce result like

store_name         Sales    Date
LOS ANGELES        $1500    Jan-05-1999
SAN DIEGO          $250 Jan-07-1999
SAN FRANCISCO      $300 Jan-08-1999

In the above example coulmn_name=store_name which fetched the result LOS ANGELES, SAN DiEGO, SAN Fran..

which contains AN.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜