仅在SQL Server数据库中显示包含3个单词的名称
16lz
2021-01-22
I have a database with table contains information about employees in my company. I need a SQL statement to show all names whose have 3 parts like "haitham samey hegazy" and who less or more than 3 parts didn't shown in the condition result. I try to use like operator but it doesn't work and my database is in Arabic language.
我有一个数据库,其中包含有关我公司员工的信息。我需要一个SQL语句来显示所有具有3个部分的名称,如“haitham samey hegazy”,以及在条件结果中没有显示少于或多于3个部分的名称。我尝试使用like运算符,但它不起作用,我的数据库是阿拉伯语。
Thanks for helping...
谢谢你的帮助......
2 个解决方案
#1
1
Assuming names are separated by a single space, you can get at least three parts using:
假设名称由单个空格分隔,您可以使用以下方法获得至少三个部分:
where name like '% % %'
You can get exactly three parts using:
您可以使用以下三个部分获得:
where name like '% % %' and name not like '% % % %'
更多相关文章
- 如何在android 5.0(L)中运行应用程序活动名称?
- 使用Java解析XML文件以获取名称列表
- dom4j-java-如何获取root中具有特定元素名称的所有元素(父元素或
- 如何在Apache POI(java)中读取.docx中的字体大小和字体名称
- 如何从java获取spring配置文件名称
- Java:IntelliJ想法生成的代码错误地为所有Class名称添加了其包名
- Java XML - 具有相同名称的嵌套元素