开发者

Ignoring Apostrophes In Contains

Simple question, perhaps a difficult answer. 开发者_如何学PythonWe're using CONTAINS but when matching criteria containing apostrophes (because these are for French road names), then obviously they don't match. So for example, searching for "Lislet" when the database contains "L'islet" yields nothing.

I've looked into using dictionaries and thesauruses (SQL features) but unfortunately neither do the job. Thesauruses looked very promising, but upon testing in our environment, it became apparent that they don't support apostrophes, which is a big shame 'cause that would've worked perfectly.

The only other thing we're thinking of doing is creating a fully indexed view that strips out the apostrophes.

Any other bright ideas?


Have you examined the Full-Text Catalog for your database? There is an Accent sensitivity option. You can select Sensitive or Insensitive. I think you want this to be set to Insensitive, so that the apostrophes are ignored.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜