我想用PatIndex删除'‘和'’。我的代码是..。
@String = 'Hello[ W]orld'
@MatchPattern = '[]'
@MatchPattern = '%[+@MatchPattern+]%'
Set @ String = Stuff(@String, PatIndex(@MatchExpression, @String), 1, '')但它没有完成,因为它已经包含了两个括号。我怎么才能解决这个问题?
发布于 2018-03-07 11:11:16
为什么不使用替换:
select replace(replace('Hello[ W]orld', ']', ''), '[', '')https://stackoverflow.com/questions/49150240
复制相似问题