Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

sql server rtrim everything after character

SELECT   [FullName]
	    ,LEFT([FullName], CHARINDEX(',', [FullName]) - 1) AS [Surname]
	    ,REPLACE(SUBSTRING([FullName], CHARINDEX(',', [FullName]), LEN([FullName])), ',', '') AS [FirstName]
FROM    Employee
Source by www.sqlservercentral.com #
 
PREVIOUS NEXT
Tagged: #sql #server #rtrim #character
ADD COMMENT
Topic
Name
8+9 =