Search
 
SCRIPT & CODE EXAMPLE
 

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
Comment

PREVIOUS NEXT
Code Example
Sql :: compare date mysql 
Sql :: how to create a table in mysql 
Sql :: sql server output parameter 
Sql :: clear screen command on mysql 
Sql :: sql select last id 
Sql :: not exists mysql 
Sql :: sql select into statement 
Sql :: sql blank vs null 
Sql :: Postgresql get diff between two dates in Months 
Sql :: show table postgres command 
Sql :: remove unique key from a table 
Sql :: check if sql is installed 
Sql :: mysql auto increment after delete 
Sql :: select milliseconds mysql 
Sql :: oracle running queries sql 
Sql :: laravel jwt 
Sql :: how to check grants on a package in oracle 
Sql :: how to put value in variable mysql 
Sql :: drop column from local database postgres pgadmin 
Sql :: Cast for print sql 
Sql :: declaring variables in pl sql 
Sql :: mariadb json select 
Sql :: sql escape quote 
Sql :: sql select case when 
Sql :: between sql server 
Sql :: oracle index hint 
Sql :: what is the difference between clustered and non-clustered index in sql server 
Sql :: insert snowflake 
Sql :: oracle array 
Sql :: Write an SQL query to print details of the Workers whose FIRST_NAME ends with ‘a’. 
ADD CONTENT
Topic
Content
Source link
Name
4+7 =