I have a table like this
Value String ------------------- 1 Cleo, Smith
I want to separate the comma delimited string into two colu
With SQL Server 2016 we can use string_split to accomplish this:
create table commasep ( id int identity(1,1) ,string nvarchar(100) ) insert into commasep (string) values ('John, Adam'), ('test1,test2,test3') select id, [value] as String from commasep cross apply string_split(string,',')