如何在一条sql中完成多处内容的替换 那位高人知道如何在一条sql中替换多处内容如:content=‘abcdef’ 如何将a换成w,将b换成e,要在一条sql中完成想过用replace,可是一次只能替换一个,那位有啥好方法,多谢了哈! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 蠢办法...替换一次后再替换一次...select regexp_replace(regexp_replace('abcdef','a','w'),'b','e') from dual; select translate('abcdef','ab','we') from dual; --这个好一点点的SQL> SQL> select regexp_replace('abcdef', 2 (case 3 when instr('abcdef', 'a') > 0 then 4 'a' 5 when instr('abcdef', 'b') > 0 then 6 'b' 7 end), 8 (case 9 when instr('abcdef', 'a') > 0 then 10 'w' 11 when instr('abcdef', 'b') > 0 then 12 'e' 13 end)) 14 from dual;REGEXP_REPLACE('ABCDEF',(CASEW--------------------------------------------------------------------------------wbcdefSQL> 3楼,你说的方法好像不行,因为我要替换的内容比较长发来你看看Dear mail_name<br> Approve the captioned single request, please click below link:<br> mail_detail_link <br><br> Approve all pending requests, please click below link:<br> mail_list_link <br>;要替换的是mail_name=result.namemail_detail_link=form.form_on_hand_linkmail_list_link=form.form_on_hand_link用你说的替换出来的不对哦 decode能放进范围值吗? 大神求助 看不懂一个WHERE语句,请大家帮忙 oracle job 怎样执行sql文件?(★★★☆) 入门级问题,会的人1分钟就搞定!!! 请教一个SQL文的写法 请教高手 求一简单SQL语句 触发器写法问题(有关随机数) 请问在enterprise manage configuration assistant 里的用户名,密码和服务器应该怎么添 关于Oracle关联算法的优化 oracle 自定义类型可以用现有表作为其中一个属性的类型吗?
--这个好一点点的
SQL>
SQL> select regexp_replace('abcdef',
2 (case
3 when instr('abcdef', 'a') > 0 then
4 'a'
5 when instr('abcdef', 'b') > 0 then
6 'b'
7 end),
8 (case
9 when instr('abcdef', 'a') > 0 then
10 'w'
11 when instr('abcdef', 'b') > 0 then
12 'e'
13 end))
14 from dual;REGEXP_REPLACE('ABCDEF',(CASEW
--------------------------------------------------------------------------------
wbcdefSQL>
Dear mail_name<br>
Approve the captioned single request, please click below link:<br>
mail_detail_link <br><br>
Approve all pending requests, please click below link:<br>
mail_list_link <br>;
要替换的是
mail_name=result.name
mail_detail_link=form.form_on_hand_link
mail_list_link=form.form_on_hand_link
用你说的替换出来的不对哦