ORA-00932: inconsistent datatypes: expected - got CLOB

SQL> SELECT DISTINCT D.SQL_ID, D.SQL_FULLTEXT, D.SQL_TEXT
  2    FROM V$SQL D
  3   WHERE D.SQL_ID = 'fsuzhxtaw402x';

 

ORA-00932: inconsistent datatypes: expected - got CLOB

 

-- 由于SQL_FULLTEXT是CLOB类型,可能是oracle不支持对CLOB类型的distinct   去掉distinct后查询正常

 

SQL> SELECT D.SQL_ID, D.SQL_FULLTEXT, D.SQL_TEXT
  2    FROM V$SQL D
  3   WHERE D.SQL_ID = 'fsuzhxtaw402x';

 

SQL_ID              SQL_FULLTEXT                                          SQL_TEXT                                       
-------------------  --------------------------------------------------      ------------------------------------------------
fsuzhxtaw402x  select seq_pmain.nextval from dual     select seq_pmain.nextval from dual
fsuzhxtaw402x  select seq_pmain.nextval from dual     select seq_pmain.nextval from dual

 

引用:http://blog.csdn.net/lwei_998/article/details/6387279

posted on 2012-02-28 16:47  皮狼  阅读(10551)  评论(0编辑  收藏  举报

导航