Answers for "Get the User Name and Domain Name from an Email Address"

SQL
1

Get the User Name and Domain Name from an Email Address

DECLARE @Email     VARCHAR(50) = '[email protected]'

SELECT SUBSTRING(@Email, 1, CHARINDEX('@', @Email) - 1) AS [User Name],
       SUBSTRING(@Email, CHARINDEX('@', @Email) + 1, LEN(@Email)) AS [Domain Name]
Posted by: Guest on April-30-2021

Code answers related to "Get the User Name and Domain Name from an Email Address"

Code answers related to "SQL"

Browse Popular Code Answers by Language