sql语句如下:
select TranTel,BranCode,SndTimeStamp,RcvTimeStamp from PSFreeMsgReg where 1=1 and trim(BranCode) = ('100001') and to_date(AcpDate,'yyyymmdd') >= to_date('20111208','yyyyMMdd') and to_date(AcpDate,'yyyyMMdd') <= to_date('20120801','yyyymmdd'),
就报ORA-01841: (full) year must be between -4713 and +9999, and not be ,看语句也没什么问题,让人很郁闷,找了把半天,才发现,对应的AcpDate列,里存在null,或者里面的值不是按照日期格式写的!
本文介绍了一个特定的SQL查询语句导致ORA-01841错误的原因及排查过程。发现该问题源于目标列AcpDate中存在NULL值或不符合日期格式的数据。
5399

被折叠的 条评论
为什么被折叠?



