long不能作為查詢條件的。
long raw或者blob,clob則可以。

解决方案 »

  1.   

    http://expert.csdn.net/Expert/topic/1813/1813692.xml?temp=.8968927使用long raw有很多限制,具体参考:
    Application Developer’s Guide - Fundamentals
    下载地址:
    http://gigabase.idi.ntnu.no/oradoc/nav/docindex.htm
      

  2.   

    建义使用clob
    LONG columns cannot appear in certain parts of SQL statements: WHERE clauses, GROUP BY clauses, ORDER BY clauses, or CONNECT BY clauses or with the DISTINCT operator in SELECT statements The UNIQUE operator of a SELECT statement The column list of a CREATE CLUSTER statement The CLUSTER clause of a CREATE MATERIALIZED VIEW statement SQL functions (such as SUBSTR or INSTR) Expressions or conditions SELECT lists of queries containing GROUP BY clauses SELECT lists of subqueries or queries combined by the UNION, INTERSECT, or MINUS set operators SELECT lists of CREATE TABLE ... AS SELECT statements SELECT lists in subqueries in INSERT statements
      

  3.   

    用CLOB
      http://www.oradb.net/sql/sqlplus_005.htm
      

  4.   

    利用Oracle Text,你可以回答如“在存在单词‘Oracle’的行同时存在单词’Corporation’而且两单词间距不超过10个单词的文本‘,’查询含有单词’Oracle’或者单词’ california’的文本,并且将结果按准确度进行排序‘,’含有词根train的文本‘。以下的sql代码实现了如上功能。
    DROP INDEX index mytext_idx
    /
    CREATE INDEX mytext_idx
    ON mytext( thetext )
    INDEXTYPE is CTXSYS.CONTEXT
    /
    SELECT id
    FROM mytext
    WHERE contains (thetext, 'near((Oracle,Corporation),10)') > 0

    SELECT score (1), id
    FROM mytext
    WHERE contains (thetext, 'Oracle or california', 1) > 0
    ORDER BY score (1) DESC
    /
    SELECT id
    FROM mytext
    WHERE contains (thetext, '$train') > 0;
      

  5.   

    long不能作为查询条件的
    建议采用long raw或者blob,clob做为clob进行查询,可以使用相关的dbms_lob包中的东西,或者如楼上所提的方法