Created
September 16, 2015 19:46
-
-
Save vkbandi/0057b35d75609cd68abe to your computer and use it in GitHub Desktop.
T-SQL Query will retrieve anything that is after the @ symbol, the query can be very useful for retrieving the domain of an email address
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT SUBSTRING(T.Email,(CHARINDEX('@',T.Email)+1),LEN(T.Email) - (CHARINDEX('@',T.Email))) as DomainName FROM EmailTable T |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment