做如下替换:
将字符串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-10-30 09:40:15
做如下替换:
将字符串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 ‘%#%#%‘