oracle中去掉回車換行空格的方法詳解
更新時間:2013年05月30日 09:31:50 作者:
本篇文章是對oracle中去掉回車換行空格的解決方法進行了詳細的分析介紹,需要的朋友參考下
去除換行
update zhzl_address t set t.add_administration_num=replace(t.add_administration_num,chr(10),'');
去掉回車
update zhzl_address t set t.add_administration_num=replace(t.add_administration_num,chr(13),'');
去掉空格
update zhzl_address t set t.add_administration_num=trim(t.add_administration_num);
-----------------------------
1、回車換行符
chr(10)是換行符,
chr(13)是回車,
增加換行符
select ' update ' || table_name ||
' set VALID_STATE =''0A'';'||chr(13)||' commit;'
from user_tables
刪除換行符
select id,replace(content,to_char(chr(13))||to_char(chr(10)),'_r_n') from fact_content order by content;
oracle中去掉文本中的換行符、回車符、制表符小結(jié)
一、特殊符號ascii定義
制表符 chr(9)
換行符 chr(10)
回車符 chr(13)
二、嵌套使用repalce,注意每次只能提交一個符號,如先回車再換行
select REPLACE(gg, chr(10), '') from dual
要注意chr(13) | | chr(10) 此類結(jié)合使用的情況比較多,回車換行在notepad中是比較好看點的,所以要考慮此種情況
select translate(string,chr(13)||chr(10),',') from dual;
三、對于字符大對象的符號處理
對于clob字段中的符號處理,先to_char然后一樣的處理
SQL> select to_char(vcl),replace(to_char(vcl),chr(10),'[]') from test_1;
update zhzl_address t set t.add_administration_num=replace(t.add_administration_num,chr(10),'');
去掉回車
update zhzl_address t set t.add_administration_num=replace(t.add_administration_num,chr(13),'');
去掉空格
update zhzl_address t set t.add_administration_num=trim(t.add_administration_num);
-----------------------------
1、回車換行符
chr(10)是換行符,
chr(13)是回車,
增加換行符
select ' update ' || table_name ||
' set VALID_STATE =''0A'';'||chr(13)||' commit;'
from user_tables
刪除換行符
select id,replace(content,to_char(chr(13))||to_char(chr(10)),'_r_n') from fact_content order by content;
oracle中去掉文本中的換行符、回車符、制表符小結(jié)
一、特殊符號ascii定義
制表符 chr(9)
換行符 chr(10)
回車符 chr(13)
二、嵌套使用repalce,注意每次只能提交一個符號,如先回車再換行
select REPLACE(gg, chr(10), '') from dual
要注意chr(13) | | chr(10) 此類結(jié)合使用的情況比較多,回車換行在notepad中是比較好看點的,所以要考慮此種情況
select translate(string,chr(13)||chr(10),',') from dual;
三、對于字符大對象的符號處理
對于clob字段中的符號處理,先to_char然后一樣的處理
SQL> select to_char(vcl),replace(to_char(vcl),chr(10),'[]') from test_1;
相關(guān)文章
Oracle轉(zhuǎn)換MySql之遞歸start with詳解
Oracle中的`startwith`函數(shù)在MySQL中需要轉(zhuǎn)換為使用`LIKE`操作符,并且可能需要自定義函數(shù)來實現(xiàn)類似的功能2024-12-12
oracle bbed恢復(fù)刪除數(shù)據(jù)實例
在oracle中bbed恢復(fù)刪除數(shù)據(jù)實例2013-11-11
expdp與impdp導(dǎo)出導(dǎo)入特定表方式
文章介紹了在Oracle數(shù)據(jù)庫中導(dǎo)入導(dǎo)出特定表的方法,包括在10g和11g/12c中的操作區(qū)別,以及如何使用DBBAK文件夾作為導(dǎo)出文件的存儲,同時,文章指出了在Windows Server 2012及以上版本中使用PowerShell時可能會遇到的問題,建議在DOS命令行窗口中執(zhí)行相關(guān)操作2025-01-01
Oracle數(shù)據(jù)庫中表壓縮的實現(xiàn)方式和特點
在 Oracle 數(shù)據(jù)庫中,表壓縮是一項重要的功能,旨在優(yōu)化存儲空間和提高性能,Oracle 提供了多種表壓縮技術(shù),以適應(yīng)不同的應(yīng)用場景和需求,以下是 Oracle 數(shù)據(jù)庫中表壓縮的實現(xiàn)方式和特點,需要的朋友可以參考下2024-10-10
Oracle使用RMAN備份數(shù)據(jù)庫的流程步驟
使用 RMAN(Recovery Manager)備份 Oracle 數(shù)據(jù)庫是確保數(shù)據(jù)安全和可恢復(fù)性的關(guān)鍵步驟,下面是詳細的指導(dǎo)和代碼示例,展示如何使用 RMAN 進行數(shù)據(jù)庫備份,感興趣的小伙伴跟著小編一起來看看吧2024-09-09
Oracle庫恢復(fù)刪除數(shù)據(jù)的方法小結(jié)
誤刪?Oracle?庫中的數(shù)據(jù),在不考慮全庫備份和利用歸檔日志情況,如何恢復(fù)數(shù)據(jù)呢,這篇文章將給大家介紹幾種方法恢復(fù)數(shù)據(jù),文章通過代碼示例給大家介紹的非常詳細,需要的朋友可以參考下2023-12-12

