ITPub博客

首页 > 数据库 > Oracle > [20150707]ORA-00932.txt

[20150707]ORA-00932.txt

原创 Oracle 作者:lfree 时间:2015-07-07 08:23:53 0 删除 编辑

[20150707]ORA-00932: inconsistent datatypes: expected - got CLOB.txt

--自己写一个通过sql_id查看sql语句的脚本:

column sqltext format a200
select sql_id,replace(sql_fulltext,chr(13),'') sqltext  from v$sql where  sql_id = '&&1' and rownum<=1
union
select sql_id,replace(sql_text,chr(13),'') sqltext  from dba_hist_sqltext where  sql_id = '&&1' and rownum<=1;

--出现如下错误:
              *
ERROR at line 1:
ORA-00932: inconsistent datatypes: expected - got CLOB

--修改如下ok:

$ cat sqlid.sql
column sql_fulltext format a160
column sqltext format a200

select sql_id,to_char(replace(sql_fulltext,chr(13),'')) sqltext  from v$sql where  sql_id = '&&1' and rownum<=1
union
select sql_id,to_char(replace(sql_text,chr(13),'')) sqltext  from dba_hist_sqltext where  sql_id = '&&1' and rownum<=1;

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/267265/viewspace-1725167/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
熟悉oracle相关技术,擅长sql优化,rman备份与恢复,熟悉linux shell编程。

注册时间:2008-01-03

  • 博文量
    4006
  • 访问量
    7971835