DECLARE @FullName VARCHAR(100)
SET @FullName = 'John Doe Lopez'
SELECT PARSENAME(REPLACE(@FullName, ' ', '.'), 3) AS [Last2Name],
PARSENAME(REPLACE(@FullName, ' ', '.'), 2) AS [FirstName],
PARSENAME(REPLACE(@FullName, ' ', '.'), 1) AS [LastName]
No hay comentarios:
Publicar un comentario