If using SQL Server it could be something such as :
create table tmp(value varchar(20))
insert into tmp(value) values ('AA hello'),('KLM YES'),('NNN VERY GOOD'),('HF BEST'),('AAA')
go
select substring(value,charindex(' ',value),LEN(value)+1) from tmp
Edit: I'm using the fact that CHARINDEX(' ',value) returns 0 if a string is not found, and that substring starts from 1 but does take the start index to get enough characters so LEN(value)+1 ensure all is taken to the end even if CHARINDEX(' ',value) returns
0.
Member
289 Points
664 Posts
Get Record After First Space
Dec 23, 2020 07:18 AM|Gopi.MCA|LINK
Hello
This is my column1 data
AA hello
KLM YES
NNN VERY GOOD
HF BEST
I want outplut like this after space data
hello
Yes
VERY GOOD
BEST
All-Star
48280 Points
17983 Posts
Re: Get Record After First Space
Dec 23, 2020 10:21 AM|PatriceSc|LINK
Hi,
If using SQL Server it could be something such as :
See String Functions (Transact-SQL) - SQL Server | Microsoft Docs for all string functions.
Edit: I'm using the fact that CHARINDEX(' ',value) returns 0 if a string is not found, and that substring starts from 1 but does take the start index to get enough characters so LEN(value)+1 ensure all is taken to the end even if CHARINDEX(' ',value) returns 0.