教程中国
PHOTOSHOP CS9.0中文版 MAYA 8.5 FOR WINDOWS Corel Painter v9.0 Flash MX2004 中文版 Illustrator cs2 中文版
VC++6.0含sp6 中英文版 VB6.0 +sp6 简体中文版 Borland Delphi 7汉化版 MSDN for vb6.0中文版 Visual Studio 2005简体
教程中国下属 文件存储共享专家BIBIDU.COM 提供大型软件,教材,源码,电影,音乐,图书等下载 更多精品请点此进入
  您目前所在位置: 教程中国 >> Oracle >> 开发技术 >> 如何对CLOB行字段执行全文检索 RSS订阅
如何对CLOB行字段执行全文检索
教程(视频,书籍)下载:  ASP.NET AutoCAD 数据库 C# ASP java photoshop 网页设计 delphi 3dmax Flash C++ VB 张孝祥 实例   更多请进入BIBIDU搜索
IT搜索引擎   

  大家知道,超过4000字的文本一般存储在CLOB中(MSQL、Sysbase是存放在Text中),在目前的Oracle版本(Oracle8i)中,对大字段CLOB仍然不支持在where子句直接的like操作,如何实现对存储在CLOB字段中的内容进行like查找呢?下面的文章或则能给你帮助。虽然在SQL*PLUS中能实现用select直接看到CLOB的内容,但是如何通过DBMS_LOB包实现对中文环境下的CLOB内容的读取我一直没有找到好的方法(使用Documents中提到的Samples只适用英文字符集),这极大的限制了使用第3方软件开发工作的自由度。如果那位仁兄有高招希望Email给我。
  
  表结构:
  create table products(
  productid number(10) not null ,
  name varchar2(255) ,
  description CLOB) ;
  
  方法:
  SELECT productid, name FROM products
  WHERE dbms_lob.instr(products.description,'some text',1,1) > 0;
  
  下面列出了DBMS_LOB包中的过程函数:
  
  APPEND procedure Appends the contents of the source LOB to the destination LOB.
  
  CLOSE procedure Closes a previously opened internal or external LOB.
  
  COMPARE function Compares two entire LOBs or parts of two LOBs.
  
  COPY procedure Copies all, or part, of the source LOB to the destination LOB.
  
  CREATETEMPORARY procedure Creates a temporary BLOB or CLOB and its corresponding index in the user's default temporary tablespace.
  
  ERASE procedure Erases all or part of a LOB.
  
  FILECLOSE procedure Closes the file.
  
  FILECLOSEALL procedure Closes all previously opened files.
  
  FILEEXISTS function Checks if the file exists on the server.
  
  FILEGETNAME procedure Gets the directory alias and file name.
  
  FILEISOPEN function Checks if the file was opened using the input BFILE locators.
  
  FILEOPEN procedure Opens a file.
  
  FREETEMPORARY procedure Frees the temporary BLOB or CLOB in the user's default temporary tablespace.
  
  GETCHUNKSIZE function Returns the amount of space used in the LOB chunk to store the LOB value.
  
  GETLENGTH function Gets the length of the LOB value.
  
  INSTR function Returns the matching position of the nth occurrence of the pattern in the LOB.
  
  ISOPEN function Checks to see if the LOB was already opened using the input locator.
  
  ISTEMPORARY function Checks if the locator is pointing to a temporary LOB.
  
  LOADFROMFILE procedure Loads BFILE data into an internal LOB.
  
  OPEN procedure Opens a LOB (internal, external, or temporary) in the indicated mode.
  
  READ procedure Reads data from the LOB starting at the specified offset.
  
  SUBSTR function Returns part of the LOB value starting at the specified offset.
  
  TRIM procedure Trims the LOB value to the specified shorter length.
  
  WRITE procedure Writes data to the LOB from a specified offset.
  
  WRITEAPPEND procedure Writes a buffer to the end of a LOB.

来源:upschool.com.cn
作者:
关键字:如何
发表日期:2007-1-6 1:06:43

网页显示有限 阅读全文请下载本文完整版WORD文档

上一篇:在Oracle数据库中连接异种数据源   下一篇:ASP 中通过OLEDB访问Oracle的代码


2008-12-3 2:38:50
本文的相类似文章
  • VB下如何编写CRC校验程序
  • 教你如何做控件*.ocx(补充)
  • VB 如何识别键盘左右的shift,Ctrl或Alt键
  • 教你如何自己动手查杀木马!
  • 如何关闭端口防止病毒与黑客入侵
  • 假期上网如何保护电脑安全
  • 如何抵御身份盗窃
  • 木马是如何加载到计算机的
  • 如何有效避免电脑病毒的侵袭
  • 如何把木马病毒驱逐门外
  • 在学习中进步 在进步中成长 教程中国相随您的成长之路
    华腾联合科技股份有限公司版权所有
    广告联系:Rosibo@163.com