Home » SQL & PL/SQL » SQL & PL/SQL » Update CLOB column
Update CLOB column [message #336075] Thu, 24 July 2008 13:07 Go to next message
ibuchatting
Messages: 2
Registered: July 2008
Location: Chennai
Junior Member
Hi,

I have CLOB column in a table which contains carriage return (\r) and enter (\n) characters. I have to replace these characters by a space.

Please help me in doing this.

Thanks in advance
Re: Update CLOB column [message #336078 is a reply to message #336075] Thu, 24 July 2008 13:09 Go to previous messageGo to next message
BlackSwan
Messages: 25041
Registered: January 2009
Location: SoCal
Senior Member
http://www.orafaq.com/forum/t/88153/0/
Please read & follow posting guidelines as stated in URL above
Re: Update CLOB column [message #336079 is a reply to message #336075] Thu, 24 July 2008 13:13 Go to previous messageGo to next message
Michel Cadot
Messages: 64120
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Use REPLACE.

Regards
Michel
Re: Update CLOB column [message #336083 is a reply to message #336079] Thu, 24 July 2008 13:24 Go to previous messageGo to next message
ibuchatting
Messages: 2
Registered: July 2008
Location: Chennai
Junior Member
Dear Michel,

Thanks for your response.

I thought i need to use DBMS_LOB package. Since I am not comfortable in this i had raised request here.

Please confirm whether the following update statement will do,

UPDATE Table_name SET Column_Name= REPLACE(REPLACE(Column_Name,'\r',' '),'\n',' ');

Thanks in advance.
Re: Update CLOB column [message #336090 is a reply to message #336083] Thu, 24 July 2008 14:29 Go to previous messageGo to next message
Michel Cadot
Messages: 64120
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
It depends on the version that you didn't post.

I would say: just try it.

Regards
Michel
Re: Update CLOB column [message #336098 is a reply to message #336075] Thu, 24 July 2008 15:31 Go to previous message
coleing
Messages: 213
Registered: February 2008
Senior Member
Theres a 32k limit on REPLACE and most other standard SQL commands, depends on hwo big the text is I guess.
Previous Topic: Help on SQL QUERY.
Next Topic: UTL_FILE open file
Goto Forum:
  


Current Time: Tue Dec 06 14:27:59 CST 2016

Total time taken to generate the page: 0.11040 seconds