How to get the words like | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

How to get the words like

Hi Guys, I declared one variable and assign the values like ‘star, moon, sun, galaxy’ The output should be ‘star’, ‘moon’, ‘sun’, ‘galaxy’ Thanks in Advance lkarthik
Why do you need this? declare @s varchar(1000)
set @s=’star, moon, sun, galaxy’
select ””+replace(@s,’, ‘,”’,”’)+””
Madhivanan Failing to plan is Planning to fail