删除除一个ID之外的特定域的所有电子邮件ID。 [英] Remove all email id with a specific domain except one id.

查看:85
本文介绍了删除除一个ID之外的特定域的所有电子邮件ID。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我在一家电子商务公司工作。我需要提交一份报告,其中不包含公司员工办公室电子邮件ID中的订单,除了一份。例如:假设我的办公室ID是''XXXX@mycmpny.com''。除了YYYY@mycmpny.com,我必须用_@mycmpny.com排除所有记录。我怎样才能在sql server中执行此操作?当我使用''不喜欢''功能时,它将全部排除在外。请帮忙。



提前致谢。



问候,



Shanif

Hi All,

I''m working in an ecommerce company. I need to take a report which does not contain the orders placed from company employees office email id except one. For eg: suppose my office id is ''XXXX@mycmpny.com''. I have to exclude all records with _@mycmpny.com except YYYY@mycmpny.com. How can I do this in sql server? When I use ''not like'' function, it is excluding all. Please help.

Thanks in advance.

Regards,

Shanif

推荐答案

WHERE   CAST(CONVERT(VARCHAR,trndate,101)AS DATETIME) BETWEEN @DteFrmDate AND @DteToDate AND ex.ExcVarDomain IN (SELECT * FROM dbo.UdfEsSplitPrdCls(@VarEstoreList,'|'))
            AND TrnVarFrmEid  not like '%_@natl._%'
and TrnVarFrmEid not like '%_@chennaibazaar._%'
and TrnVarFrmEid not like '%_@diy._%'
and TrnVarFrmEid not like '%_@cbazaar._%'


In this we need to check email id should  contain chat@cbazaar.com. but we given the condition 'and TrnVarFrmEid not like '%_@cbazaar._%''. Obviously it will not shown there. so kindly rearrange this statement to get chat@cbazaar.com and not other @cbazaar.com






请告诉我们区分每个电子邮件ID的分隔符。然后你可以使用功能和分离所有电子邮件ID并将其放入Tem Table或Table Type中,然后你可以处理你想要的东西。

在关注我的帖子...检查答案然后你会明确的想法。



拆分功能错误 - 声明终止。在语句完成之前,最大递归100已经耗尽 [ ^ ]



如果有任何Clarificatiosn回复我...... :-)

问候,

GVPrabu
Hi,

Tel me the delimiter for Differenciate each email IDs. then u can use function and Seperate all Email IDs and put it in Tem Table or Table Type veriable then u can process what ever u want.
In Following my Post... check the Answer then u ll get Clear Idea.

Split function error - The statement terminated. The maximum recursion 100 has been exhausted before statement completion[^]

If any Clarificatiosn Get back to me.... :-)
Regards,
GVPrabu


这篇关于删除除一个ID之外的特定域的所有电子邮件ID。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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