改了一下,就算括号后有内容也可以:
update AA set AA1=substring(AA1,1,charindex('(',AA1)-1)
+substring(AA1,charindex(')',AA1)+1,(len(AA1)-charindex(')',AA1)))
where patindex('%(%)%',AA1) != 0
update AA set AA1=substring(AA1,1,charindex('(',AA1)-1)
+substring(AA1,charindex(')',AA1)+1,(len(AA1)-charindex(')',AA1)))
where patindex('%(%)%',AA1) != 0
字符串这样可以拼接在一起么?好像应该有个||之类的东西吧