sql:find domainname
I want to extract a domainname from an emailaddress by sql from an sql database (the name after the '@'). By example: hotmail.com The addressfield is textbased.
How can i achieve this?
Software
I want to extract a domainname from an emailaddress by sql from an sql database (the name after the '@'). By example: hotmail.com The addressfield is textbased.
How can i achieve this?
by fvtrier Accepted solution
by tony hopkinson Accepted solution
Given it's X@Y.Z
Select Substr([emailaddress],Instr([emailaddress],'@'),DataLength([EmailAddress]) - Instr([emailaddress],'@'))
From Contacts
Note assumes emailaddress is a varchar, DataLength would return fieldwidth for char and sometimes for text.
This discussion is closed to new replies.
Sort by Trending