如何创建搜索开始或结束之间或之后的任何数据匹配空间&在第一个单词或结束之前,任何搜索应该是工作。 [英] How to create a search start or ending or between any data match after space & before after first word or ending whatever search should be work.

查看:82
本文介绍了如何创建搜索开始或结束之间或之后的任何数据匹配空间&在第一个单词或结束之前,任何搜索应该是工作。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何创建搜索第一个类型的第一个单词然后键入中间单词然后键入行的最后一个单词然后再键入第二个单词行?



like



BUTTON PLASTIC 10MM过滤器2HOLE



我想搜索按钮塑料孔搜索完全正常工作。

但我希望搜索像(按钮孔塑料)或(按钮10mm 2孔)或(2孔按钮10mm)不工作搜索或按钮过滤器10MM





简单地说我想搜索空格&之后的开始或结束或任何数据匹配之间在第一个单词或结束之前,无论什么搜索应该工作。



如果你知道请帮助



< b>我尝试了什么:



我在SQL中使用Wild卡来搜索和实现c#。

how to create a search first type first word then type middle word then type last word of row then again type second word of row?

like

BUTTON PLASTIC 10MM FILTER 2HOLE

I want search Button plastic Hole search exactly do work.
but i want search like (Button Hole plastic) or (button 10mm 2hole) or (2hole button 10mm) not work search or Button Filter 10MM


Simply I want to search start or ending or between any data match after space & before after first word or ending whatever search should be work.

Please Help if you know

What I have tried:

I am using Wild card in SQL for searching and implementing c#.

推荐答案

基本上,你需要为你想要的每个单词生成一个单独的WHERE条件:

Basically, you need to produce a separate WHERE conditionfor each word you want:
... WHERE myColumn LIKE '%Button% OR myColumn LIKE '%10MM%' OR ...

将查找包含任何单词的所有行。

另一种解决方案是使用全文搜索,但设置和使用它们更复杂:全文搜索 [ ^ ]

Will find all rows which contain any of the words.
The other solution would be to use a full text search, but they are more complex to set up and use: Full-Text Search[^]


这篇关于如何创建搜索开始或结束之间或之后的任何数据匹配空间&amp;在第一个单词或结束之前,任何搜索应该是工作。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆