分隔字符
想把 'a,b,c,d,e' 变成'a','b','c','d','e'
要怎么写。谢谢 分隔,Split
[解决办法]
DECLARE @a NVARCHAR(128)
SET @a='a,b,c,d,e'
SELECT REPLACE(''''+@a+'''',',',''',''')
/*
'a','b','c','d','e'
*/
DECLARE @str VARCHAR(max)
SET @str = 'a,b,c,d,e'
SELECT ''''+REPLACE(@str, ',', ''',''')+''''
/*'a','b','c','d','e'*/