从SQL中的电子邮件地址提取扩展
我想从电子邮件地址提取扩展名。
输入: 输出: com
输入: [ ;受保护]
输出: test.com
我尝试过,
(REVERSE(LEFT(REVERSE('[email protected]'), CHARINDEX('.', REVERSE('[email protected]')) - 1)))
这仅起第一个输入。有帮助吗?
I wanted to extract the extension from email address.
Input: [email protected]
Output: com
Input: [email protected]
Output: test.com
I tried,
(REVERSE(LEFT(REVERSE('[email protected]'), CHARINDEX('.', REVERSE('[email protected]')) - 1)))
This works only the first input. Any help?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
似乎您要在AT符号(
@
)之后删除 。我将使用charindex
和stuff
为此:It seems you want to remove any characters prior to and including the first period (
.
) after the at symbol (@
). I would useCHARINDEX
andSTUFF
for this: