Click here to Skip to main content
15,742,357 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Convert 'xxx,yyy,zzz'
into 'xxx','yyy','zzz'

by sql 2008
[no name] 14-Jul-13 6:35am    
Not a question or description of any kind of a problem.

The question, answered:
DECLARE @strIn [nvarchar](2008)
SET @strIn = 'xxx,yyy,zzz'

A SELECT query:
SELECT REPLACE(REPLACE(REPLACE(@strIn,',',''','''),'xxx''','''xxx'''),'''zzz','''zzz''') As [simple]		

If I misunderstood, I wouldn't post this as an answer.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900