SQL 列出姓名以“S”开头并以“S”结尾的员工?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/30308514/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-01 03:38:23  来源:igfitidea点击:

List the employees whose name starts with 'S' and ends with 'S'?

sqlinformaticainformatica-powercenter

提问by user3597043

I know the SQL LIKE statement.

我知道 SQL LIKE 语句。

I want to implement SQL LIKE statement in Informatica.

我想在 Informatica 中实现 SQL LIKE 语句。

The goal is list all the employees whose name starts with 'S' and ends with 'S'.

目标是列出名称以“S”开头并以“S”结尾的所有员工。

select ENAME from EMP where ENAME LIKE ('S%') and ENAME LIKE('%S');

回答by Sam Abushanab

It looks like Informatica does not have a LIKE equivalent available. You can use REG_MATCH and insert in a regular expression that will match for starts with S and ends with S. Example Below:

看起来 Informatica 没有可用的 LIKE 等效项。您可以使用 REG_MATCH 并插入一个正则表达式,该表达式将匹配以 S 开头并以 S 结尾。示例如下:

REG_MATCH(ENAME,'[S^]+\w+[S$]')

RegExr Link: http://regexr.com/3b17b

RegExr 链接:http://regexr.com/3b17b