📄 252.html
字号:
<STYLE type=text/css>
<!--
body,td { font-size:9pt;}
hr { color: #000000; height: 1px}
-->
</STYLE>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<HEAD><TITLE>FAQ汇萃 >> Oracle 专栏 >> 如何对CLOB行字段执行全文检索</title>
</head>
<body >
<p><IMG SRC="../image/jsp001_middle_logo.gif" WIDTH="180" HEIGHT="60" BORDER=0 ALT=""></p>
<table width=100% bgcolor="#cccccc" align=center cellpadding="2" cellspacing="0" border=1 bordercolorlight="#000000" bordercolordark="#FFFFFF">
<tr bgcolor="#EFF8FF"><td>
<a href=http://www.jsp001.com/list_thread.php?int_attribute=1>FAQ汇萃</a>
>> <a href=http://www.jsp001.com/list_thread.php?forumid=20&int_attribute=1>Oracle 专栏</a>
>> 如何对CLOB行字段执行全文检索 [<a href=http://www.jsp001.com/forum/showthread.php?goto=newpost&threadid=252>查看别人的评论</a>]<br>
<hr><p>由 webmaster 发布于: 2001-02-05 11:32</p><p><img src="images/icons/icon9.gif" alt="Unhappy" border=0> </p><p><br><br>大家知道,超过4000字的文本一般存储在CLOB中(MSQL、Sysbase是存放在Text中),在目前的Oracle版本(Oracle8i)中,对大字段CLOB仍然不支持在where子句直接的like操作,如何实现对存储在CLOB字段中的内容进行like查找呢?下面的文章或则能给你帮助。虽然在SQL*PLUS中能实现用select直接看到CLOB的内容,但是如何通过DBMS_LOB包实现对中文环境下的CLOB内容的读取我一直没有找到好的方法(使用Documents中提到的Samples只适用英文字符集),这极大的限制了使用第3方软件开发工作的自由度。如果那位仁兄有高招希望Email给我。 <br><br>表结构:<br>create table products( <br>productid number(10) not null ,<br>name varchar2(255) ,<br>description CLOB) ;<br><br>方法:<br>SELECT productid, name FROM products <br>WHERE dbms_lob.instr(products.description,'some text',1,1) > 0; <br><br><br> <br><br>下面列出了DBMS_LOB包中的过程函数:<br><br>APPEND procedure Appends the contents of the source LOB to the destination LOB. <br><br>CLOSE procedure Closes a previously opened internal or external LOB. <br><br>COMPARE function Compares two entire LOBs or parts of two LOBs. <br><br>COPY procedure Copies all, or part, of the source LOB to the destination LOB. <br><br>CREATETEMPORARY procedure Creates a temporary BLOB or CLOB and its corresponding index in the user's default temporary tablespace. <br><br>ERASE procedure Erases all or part of a LOB. <br><br>FILECLOSE procedure Closes the file. <br><br>FILECLOSEALL procedure Closes all previously opened files. <br><br>FILEEXISTS function Checks if the file exists on the server. <br><br>FILEGETNAME procedure Gets the directory alias and file name. <br><br>FILEISOPEN function Checks if the file was opened using the input BFILE locators. <br><br>FILEOPEN procedure Opens a file. <br><br>FREETEMPORARY procedure Frees the temporary BLOB or CLOB in the user's default temporary tablespace. <br><br>GETCHUNKSIZE function Returns the amount of space used in the LOB chunk to store the LOB value.<br><br>GETLENGTH function Gets the length of the LOB value. <br><br>INSTR function Returns the matching position of the nth occurrence of the pattern in the LOB. <br><br>ISOPEN function Checks to see if the LOB was already opened using the input locator. <br><br>ISTEMPORARY function Checks if the locator is pointing to a temporary LOB. <br><br>LOADFROMFILE procedure Loads BFILE data into an internal LOB. <br><br>OPEN procedure Opens a LOB (internal, external, or temporary) in the indicated mode. <br><br>READ procedure Reads data from the LOB starting at the specified offset.<br><br>SUBSTR function Returns part of the LOB value starting at the specified offset. <br><br>TRIM procedure Trims the LOB value to the specified shorter length. <br><br>WRITE procedure Writes data to the LOB from a specified offset. <br><br>WRITEAPPEND procedure Writes a buffer to the end of a LOB. <br></p></td>
</tr>
</table>
<p>
<CENTER><a href="http://www.jsp001.com/forum/newreply.php?action=newreply&threadid=252">点这里对该文章发表评论</a></CENTER>
<p>该文章总得分是 <font color=red>0</font> 分,你认为它对你有帮助吗?
[<a href=javascript:void(0) onclick=window.open("http://www.jsp001.com/forum/codeVote.php?threadid=252&intVote=4","","menubar=no,toolbar=no,location=no,directories=no,status=no,resizable=no,scrollbars=no,width=70,height=40,top=0,left=0")>非常多</a>](<font color=red>0</font>)
[<a href=javascript:void(0) onclick=window.open("http://www.jsp001.com/forum/codeVote.php?threadid=252&intVote=2","","menubar=no,toolbar=no,location=no,directories=no,status=no,resizable=no,scrollbars=no,width=70,height=40,top=0,left=0")>有一些</a>](<font color=red>0</font>)
[<a href=javascript:void(0) onclick=window.open("http://www.jsp001.com/forum/codeVote.php?threadid=252&intVote=1","","menubar=no,toolbar=no,location=no,directories=no,status=no,resizable=no,scrollbars=no,width=70,height=40,top=0,left=0")>无帮助</a>](<font color=red>0</font>)
[<a href=javascript:void(0) onclick=window.open("http://www.jsp001.com/forum/codeVote.php?threadid=252&intVote=-1","","menubar=no,toolbar=no,location=no,directories=no,status=no,resizable=no,scrollbars=no,width=70,height=40,top=0,left=0")>是灌水</a>](<font color=red>0</font>) </p>
<script language="javascript" src="http://www.jsp001.com/include/read_thread_script.php?threadid=252"></script>
<p><CENTER>
Copyright © 2001 - 2009 JSP001.com . All Rights Reserved <P>
<IMG SRC="../image/jsp001_small_logo.gif" WIDTH="85" HEIGHT="30" BORDER=0 ALT="">
</CENTER></p>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -