日期:2014-05-18 浏览次数:20741 次
A、B、C、D、F、E、G
'A','B','C','D','E','F','G'
if object_id('[tb]') is not null drop table [tb] go create table [tb]([col] varchar(19)) insert [tb] select 'A、B、C、D、F、E、G' go select ''''+replace(col,'、',''',''')+'''' as col from tb /** col ------------------------------------------------------ 'A','B','C','D','F','E','G' (1 行受影响) **/
------解决方案--------------------
declare @s varchar(30) set @s='A、B、C、D、F、E、G' set @s=''''+replace(@s,'、',''',''')+'''' select @s /* 'A','B','C','D','F','E','G' */