当前位置: 代码迷 >> Oracle管理 >> 怎么把某字段值中/去掉
  详细解决方案

怎么把某字段值中/去掉

热度:530   发布时间:2016-04-24 06:15:01.0
如何把某字段值中/去掉
update   TEST   set   CPH   =   replace(CPH, '/ ', ' ')   where   CPH   like   '%/% ';
我这样写是哪里错了,从来没用过ORAACLE数据库   ,麻烦大家给指点下。

------解决方案--------------------
写的没问题.不知你想达到什么目的?
------解决方案--------------------
update TEST set CPH = substr(CPH,1,instr(CPH, '/ ')-1)||substr(CPH,instr(CPH, '/ ')+1)
------解决方案--------------------
update TEST set CPH = replace(CPH, '/ ', ' ');
commit;
  相关解决方案