创建下面的物化视图报错
create materialized view BBB
refresh complete on demand
as
select a.vbillcode,
b.invname,
del.exchdate
from AA@AA a
inner join BB@BB b on a.id = b.id
left join CC@CC del on a.id = del.id
where a.dbilldae>="2013-06-15" and a.vdef7 is not null;报错:
ORA-01861: 文字与格式字符串不匹配
ORA-02063: 紧接着 line (起自 TES)分析:
通过执行物化视图的查询部分select a.vbillcode,
b.invname,
del.exchdate
from AA@AA a
inner join BB@BB b on a.id = b.id
left join CC@CC del on a.id = del.id
where a.dbilldae>="2013-06-15" and a.vdef7 is not null;仍然报相同的错误,由于这个查询涉及到了四个数据库(三个远程,一个本地),感觉可能是环境不一致问题或者sql执行环境配置问题。解决
通过在session中设置alter session set nls_language="AMERICAN";ALTER SESSION SET NLS_LANGUAGE="SIMPLIFIED CHINESE";然后发起查询都没有解决问题,那设置一下时间格式试试:alter session set nls_date_format="YYYY-MM-DD HH24:MI:SS";执行查询sql成功,没有想到一个时间格式问题会导致语句无法执行,看来什么事情都是可能会发生的。更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12
推荐阅读:ORA-01172、ORA-01151错误处理 http://www.linuxidc.com/Linux/2013-06/86529.htmORA-00600 [2662]错误解决 http://www.linuxidc.com/Linux/2013-06/86528.htmORA-01078 和 LRM-00109 报错解决方法 http://www.linuxidc.com/Linux/2012-07/66044.htmORA-00471 处理方法笔记 http://www.linuxidc.com/Linux/2013-09/90017.htmORA-00314,redolog 损坏,或丢失处理方法 http://www.linuxidc.com/Linux/2013-09/90646.htmORA-00257 归档日志过大导致无法存储的解决办法 http://www.linuxidc.com/Linux/2013-09/90594.htmOracle 表压缩详细介绍ORA-28002/ORA-28000 解决11g 密码过期、密码输错锁住用户问题--修改 default profile相关资讯 ORA-01861
- ORA-01861: literal does not (11/05/2012 09:35:48)
本文评论 查看全部评论 (0)