I have table test as
col_1
----------
aa,ab,ac
ba,bb,bc
ca,cb,cc
I want output as
col_1 col_2 col_3
-------------------------
aa ab ac
ba bb bc
ca cb cc
I have table test as
col_1
----------
aa,ab,ac
ba,bb,bc
ca,cb,cc
I want output as
col_1 col_2 col_3
-------------------------
aa ab ac
ba bb bc
ca cb cc
Here is the solution even if there are more than 2 characters seperated by comma.
Hi if there are fixed no of columns,then we can use this below query.
You can use a function to split the string and the code will look like
Select dbo.Split(col_1,',') From test