Last active
December 13, 2019 09:58
-
-
Save b2977053/9d15a3403798835a2c1b33cf1d73a2cd to your computer and use it in GitHub Desktop.
This file contains hidden or 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
PRINT SUBSTRING('A-B-C-D-E-F', 3, 1); -- B | |
PRINT SUBSTRING('A-B-C-D-E-F', 3, 2); -- B- | |
PRINT SUBSTRING('A-B-C-D-E-F', 3, 3); -- B-C | |
--gmail.com | |
DECLARE @Email NVARCHAR(100); | |
SET @Email = '[email protected]'; | |
PRINT SUBSTRING(@Email, ( CHARINDEX('@', @Email) + 1 ),( LEN(@Email) - CHARINDEX('@', @Email) )); -- gmail.com | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment