Skip to Content
0
Oct 22, 2019 at 12:40 AM

How to get domain name from email address in a webi 4.2 report?

288 Views

I have email addresses like use@gmail.com,user2345@ymail.com,user3@hotmail.com etc. I want a variable formula in webi report  that will trim user names and .com and return output as gmail,ymail,hotmail

Like below.But in webi I cant use instr/charindex/substring_index.
select(SUBSTRING_INDEX(SUBSTR(email, INSTR(email,'@')+1),'.',1))as a,count(*)as c
FROMUsergroupby a orderby c desc;