楼主什么意思,没看懂
另外你的REPLACE函数好像用法有问题吧
我做了个例子:select replace(to_char('<tr><td>1</td></tr>'),'1','') from dual;输出结果为:
<tr><td></td></tr>
另外你的REPLACE函数好像用法有问题吧
我做了个例子:select replace(to_char('<tr><td>1</td></tr>'),'1','') from dual;输出结果为:
<tr><td></td></tr>
ip_doc_entity (doccontent clob)现在有条数据的这个字段中 存放了下面的这些字符(实际更长,只是截取了一部分)
A:<TABLE>
<TBODY>
<TR style="HEIGHT: 9pt; mso-height-source: userset" height=12>
<TD style="HEIGHT: 9pt" class=xl15430 height=12></TD>
<TD style="WIDTH: 31pt" class=xl79430 width=41> </TD>
<TD style="WIDTH: 26pt" class=xl87430 width=35> </TD>
<TD style="WIDTH: 29pt" class=xl69430 width=38> </TD>
<TD style="WIDTH: 17pt" class=xl70430 width=22> </TD>
<TD style="WIDTH: 35pt" class=xl70430 width=47> </TD>
<TD style="WIDTH: 34pt" class=xl70430 width=45> </TD>
<TD style="WIDTH: 40pt" class=xl70430 width=53> </TD>
<TD style="WIDTH: 30pt" class=xl70430 width=40> </TD>
<TD style="WIDTH: 4pt" class=xl70430 width=5> </TD>
<TD style="WIDTH: 37pt" class=xl70430 width=49> </TD>
<TD style="WIDTH: 32pt" class=xl70430 width=43> </TD>
<TD style="WIDTH: 32pt" class=xl70430 width=42> </TD>
<TD style="WIDTH: 41pt" class=xl70430 width=54> </TD>
<TD style="WIDTH: 32pt" class=xl70430 width=42> </TD>
<TD style="WIDTH: 39pt" class=xl70430 width=52> </TD>
<TD style="WIDTH: 20pt" class=xl70430 width=27> </TD>
<TD style="WIDTH: 17pt" class=xl70430 width=23> </TD>
<TD style="WIDTH: 44pt" class=xl71430 width=58> </TD>
<TD class=xl15430></TD></TR>
<TR style="HEIGHT: 13.5pt" height=18>
<TD style="HEIGHT: 13.5pt" class=xl15430 height=18></TD>
<TD class=xl98430 colSpan=13>本表一式三份,业主(建设单位)、监理、承包人各一份。</TD>
<TD class=xl63430> </TD>
<TD class=xl63430> </TD>
<TD class=xl63430> </TD>
<TD class=xl63430> </TD>
<TD class=xl63430> </TD>
<TD class=xl15430></TD></TR></TBODY></TABLE>我现在要用sql把这个字段里的值的 下面的部分,给替换了(替换为空字符即‘’)
B:<TR style="HEIGHT: 9pt; mso-height-source: userset" height=12>
<TD style="HEIGHT: 9pt" class=xl15430 height=12></TD>
<TD style="WIDTH: 31pt" class=xl79430 width=41> </TD>
<TD style="WIDTH: 26pt" class=xl87430 width=35> </TD>
<TD style="WIDTH: 29pt" class=xl69430 width=38> </TD>
<TD style="WIDTH: 17pt" class=xl70430 width=22> </TD>
<TD style="WIDTH: 35pt" class=xl70430 width=47> </TD>
<TD style="WIDTH: 34pt" class=xl70430 width=45> </TD>
<TD style="WIDTH: 40pt" class=xl70430 width=53> </TD>
<TD style="WIDTH: 30pt" class=xl70430 width=40> </TD>
<TD style="WIDTH: 4pt" class=xl70430 width=5> </TD>
<TD style="WIDTH: 37pt" class=xl70430 width=49> </TD>
<TD style="WIDTH: 32pt" class=xl70430 width=43> </TD>
<TD style="WIDTH: 32pt" class=xl70430 width=42> </TD>
<TD style="WIDTH: 41pt" class=xl70430 width=54> </TD>
<TD style="WIDTH: 32pt" class=xl70430 width=42> </TD>
<TD style="WIDTH: 39pt" class=xl70430 width=52> </TD>
<TD style="WIDTH: 20pt" class=xl70430 width=27> </TD>
<TD style="WIDTH: 17pt" class=xl70430 width=23> </TD>
<TD style="WIDTH: 44pt" class=xl71430 width=58> </TD>
<TD class=xl15430></TD></TR>用 select replace(c.doccontent, B, '') from ip_doc_entity c 替换没有效果,麻烦各位帮忙看看
我的怎么可以替换:
可能是你的clob 的字符不够长,如果超过会出这个问题的
[
可能是你的clob 的字符不够长,如果超过会出这个问题的
[
刚刚那个我的数据长度是8774。都可以啊、
可能是你的clob 的字符不够长,如果超过会出这个问题的
[
刚刚那个我的数据长度是8774。都可以啊、-----------------------------你的oracle版本是多少的
可能是你的clob 的字符不够长,如果超过会出这个问题的
[
刚刚那个我的数据长度是8774。都可以啊、-----------------------------你的oracle版本是多少的
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0
已经自救,在
'<TR style="HEIGHT: 9pt; mso-height-source: userset" height=12>'||chr(13))||to_char(chr(10))||
'<TD style="HEIGHT: 9pt" class=xl15430 height=12></TD>'||chr(13))||to_char||
'<TD class=xl15430></TD></TR>',
'TR style="HEIGHT: 9pt; mso-height-source: userset" height=12>
<TD style="HEIGHT: 9pt" class=xl15430 height=12></TD>
<TD class=xl15430></TD></TR>'
, '') kk
from ip_doc_entity c
这样就行了