做如下替换:
将字符串asd#sdf#sdfsf中含# …# 形式的子串删除,写出sql语句
sql语句如下:
UPDATE MM SET name =substring(name,0,CHARINDEX(‘#‘,name))+reverse(substring(reverse(name),0,CHARINDEX(‘#‘,reverse(name))))
WHERE name like ‘%#%#%‘
时间: 2024-12-29 11:37:12
做如下替换:
将字符串asd#sdf#sdfsf中含# …# 形式的子串删除,写出sql语句
sql语句如下:
UPDATE MM SET name =substring(name,0,CHARINDEX(‘#‘,name))+reverse(substring(reverse(name),0,CHARINDEX(‘#‘,reverse(name))))
WHERE name like ‘%#%#%‘