日期:2014-05-17  浏览次数:21005 次

如何把某字段值中/去掉
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;