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
Karma: 0
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: 25578
Registered: January 2009
Location: SoCal
Karma: 0
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: 65153
Registered: March 2007
Location: Nanterre, France, http://...
Karma: 0
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
Karma: 0
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: 65153
Registered: March 2007
Location: Nanterre, France, http://...
Karma: 0
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
Karma: 0
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: How to set the Object Type to Null
Next Topic: Help on SQL QUERY.
Goto Forum:
  


Current Time: Tue Aug 22 13:51:52 CDT 2017

Total time taken to generate the page: 0.13135 seconds