oracle 替换clob里面的某个特定的字符串
2013-09-10 10:40
309 查看
关键字:replace,dbms_lob.instr
第一步:判断clob里面是有包含某个特定的字符串:假如是说“/admin/ewebeditor/uploadfile/“
关键字:dbms_lob.instr
Code:
第二步:用replace先替换下看是否是自己想要的结果
关键字:replace
Code:
第三步:替换,前面的两步ok,肯定错不了的
关键字:update set
Code:
第一步:判断clob里面是有包含某个特定的字符串:假如是说“/admin/ewebeditor/uploadfile/“
关键字:dbms_lob.instr
Code:
select st.id,st.content from t_d_strategy st where dbms_lob.instr(st.content,'/admin/ewebeditor/uploadfile/') > 0;
第二步:用replace先替换下看是否是自己想要的结果
关键字:replace
Code:
select st.id,replace(st.content,'/admin/ewebeditor/uploadfile/','E:/resource/images/uploadfile/') from t_d_strategy st where st.id = 553 and dbms_lob.instr(st.content,'/admin/ewebeditor/uploadfile/') > 0;
第三步:替换,前面的两步ok,肯定错不了的
关键字:update set
Code:
update t_d_strategy st set st.content = replace(st.content,'/admin/ewebeditor/uploadfile/','E:/resource/images/uploadfile/') where st.id = 553 and dbms_lob.instr(st.content,'/admin/ewebeditor/uploadfile/') > 0;
相关文章推荐
- 替换目录下符合要求的文件里面的特定字符串
- Oracle存储过程中使用游标来批量解析CLOB字段里面的xml字符串:
- 将一个目录下所有指定文件里面的特定字符串替换
- Oracle内正则替换Clob类型内的字符串
- 将一个目录下所有指定文件里面的特定字符串替换
- Oracle中Clob类型的字段数据转换成String字符串
- oracle里面的long,long raw,raw,clob,blob区别
- oracle字符/字符串替换
- Oracle如果需要输出引号或执行字符串里面的语句需要引号
- oracle操作字符串:拼接、替换、截取、查找
- python替换特定字符串
- 在Vi里面实现字符串的批量替换
- Python__查找替换指定文件中的特定字符串
- Java 对Oracle Clob(大字符串)格式的操作 增改查
- Shell 统计文件里面特定字符串出现次数
- mysql -替换字符串里面的字符
- 【Shell】统计文件里面特定字符串出现次数
- oracle中实现截取字符串(substr)、查找字符串位置(instr)、替换字符串(replace)
- 正则只替换URL字符串里面的汉字部分
- oracle操作字符串:拼接、替换、截取、查找