looking for some solutions? You are welcome.

SOLVED: Is there a simplest way to select only the domain name from email address in oracle?

john jo:

I have a table called email_id and column name as email_id and I have these email id’s in the column

name@yahoo.com
name@msn.com
name@gmail.com
name@xmsoftware.com 

And I need only domain names like these as result

yahoo
msn
gmail
xmsoftware 

Is there a simplest way (or) any other function than this?

select substr(email_id.email_id,(instr(email_id.email_id,'@',1)+1),(instr(email_id.email_id,'.',1) - (instr(email_id.email_id,'@',1)+1))) as domain 
from email_id;



Posted in S.E.F
via StackOverflow & StackExchange Atomic Web Robots
Share:

No comments:

Recent