积极答复者
全文搜索拼音和数字 如何不以一个词出现?

问题
答案
-
例如:我用中文(lcid)建立索引,其中包括电话和拼音,但是我查询contians时,部分包含就不出。例如:123456789 chifeng 中国 这样存在数据库中,用contains(*,'123')就查不出来,contains(*,'chi')这样也查不出,很纠结,有没有好的解决办法,谢谢啦!
你好,你可以试试下面的语句,
DECLARE @SearchWord varchar(30) SET @SearchWord ='"123*"' SELECT * FROM Your_table WHERE CONTAINS(*, @SearchWord);
Thanks.
Please remember to mark the replies as answers if they help and unmark them if they provide no help. This can be beneficial to other community members reading the thread.
- 已建议为答案 Molly Chen_Moderator 2012年6月5日 7:39
- 已标记为答案 Molly Chen_Moderator 2012年6月8日 6:53
全部回复
-
-
例如:我用中文(lcid)建立索引,其中包括电话和拼音,但是我查询contians时,部分包含就不出。例如:123456789 chifeng 中国 这样存在数据库中,用contains(*,'123')就查不出来,contains(*,'chi')这样也查不出,很纠结,有没有好的解决办法,谢谢啦!
你好,你可以试试下面的语句,
DECLARE @SearchWord varchar(30) SET @SearchWord ='"123*"' SELECT * FROM Your_table WHERE CONTAINS(*, @SearchWord);
Thanks.
Please remember to mark the replies as answers if they help and unmark them if they provide no help. This can be beneficial to other community members reading the thread.
- 已建议为答案 Molly Chen_Moderator 2012年6月5日 7:39
- 已标记为答案 Molly Chen_Moderator 2012年6月8日 6:53