Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to update a CLOB column

511434Feb 9 2009 — edited Feb 9 2009
here is my problem.

I have a table called t_clob as follows:

SQL> desc t_clob
Name Null? Type
----------------------------------------- -------- ----------------------------
C CLOB

I need to update an existing row with new data (overwrite). The new data is a big java script string with line break, spaces, alignment etc. as follows :

********************************************************************************************************************

<form name="abcdeg" accept-charset="utf-8" class="adadad" method="get" action="abd/def" id="asdsdas">
<label class="abcdef" for="sdfgsdgjgerigh">Search</label>
<div class="qwert">
<label class="qwert">
<input type="radio" name="search_type" value="wweer" id="qwert_trye" onclick="aab(ddgdfgdf);switchTo(''abcd'');" class="radio" <#if localchecked??> ${localchecked}</#if> />Site
</label>
<label class="abcdefgh">
<input type="radio" name="asddfere" value="sssd" id="sdfswererwerew" onclick="abcdefghij(this.value);switchTo(''dfsdfs'');" class="radio" <#if webchecked??> ${sdfsdfsdf}</#if> style="display:none" disabled />
<input type="radio" name="sdfsdfsdfs" value="fsdfsdfsdf" id="sdfsdfsdfsd" onclick="sdfsdfsdfsdfsdfsdf(this.value);" class="radio" <#if sfsdfsdfsdf??> ${sdfsdfsdfsdf}</#if> /> qwe
</label>
<label class="sdfdsfsdfs" style="font-size:8px">
sfsdfsdf <br>
<img src="/sdfsd/sdfsd/sfsdfsd.lfg" alt="Search"/>
</label>
<label class="qweqwe" style="display:none">
<input type="radio" name="qwewewqe" value="weqwewq" id="qweqweqwewqeq" onclick="weqweqweqeqweqw(this.value);switchTo(''business'');" class="radio" <#if localbusinesschecked??> ${qweqweweqwe}</#if> />qweqweqw
</label>
</div>
<input type="text" value="<#if q??>${q}</#if>" name="qweqwewqe" id="qweqweqwew" autocomplete="off"/>
<button type="submit" onclick="qweqweqweqw()">
<img src="/weqweqw/qweqweqwe.gif" alt="Search" />
</button>
<input type="hidden" value="<#if sm??>${sm}</#if>" id="sm" name="qwe" class="hidden"/>
<input type="hidden" value="<#if srm??>${srm}</#if>" id="srm" name="srm" class="hidden"/>
<input type="hidden" id="startIndex" name="startIndex" value="<#if start??>${start}</#if>"/>
<input type="hidden" id="currentPage" name="currentPage" value="<#if currentpage??>${currentpage}</#if> "/>
</form>
<script type="text/javascript">
window.qweqwewq = "<#if appid??>${appid}</#if>";
</script>
<script type="text/javascript" src="http://qwewqeqwewewe/qwewq/qwew/qweqwe.js"></script>

***********************************************************************************************************************************
Currently, we have the normal update statement (updating as a varchr value) in a .sql file. but running the .sql file, throws the following error:

SP2-0042: unknown command "</script>" - rest of line ignored.
SP2-0734: unknown command beginning "<script ty..." - rest of line ignored.
SP2-0734: unknown command beginning "where EXT..." - rest of line ignored.

For a work-around, we are updating the column through TOAD --> Schema Browser--> Data tab. But, this TOAD way is appearing to be error prone, though it works.

Can anybody help us in modifying the update statement so that it can directly be run from the .sql file and the spacing/ new lines are preserved.

Thanks in Advance.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 9 2009
Added on Feb 9 2009
2 comments
2,294 views