Last active
November 22, 2017 13:33
-
-
Save bruuteuzius/f6e7985adddf5394f3ed9758dc81b1e0 to your computer and use it in GitHub Desktop.
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
declare @naam nvarchar(200) = 'Testnaam, J.M.S. van de' | |
select | |
fullname = @naam | |
,initials = substring(SUBSTRING(@naam, patindex('%, %', @naam)+1, len(@naam)), 0,patindex('%. %', SUBSTRING(@naam, patindex('%, %', @naam), len(@naam)))) | |
,middlename = ltrim(substring(SUBSTRING(@naam, patindex('%, %', @naam)+1, len(@naam)), patindex('%. %', SUBSTRING(@naam, patindex('%, %', @naam), len(@naam))), len(SUBSTRING(@naam, patindex('%, %', @naam)+1, len(@naam))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment