1.无效的月份,一个可能是字符集的问题,
alter session set nls_language=american alter session set nls_language='SIMPLIFIED CHINESE'
还有一种就是某张表对应的字段格式不正确
Select Sum((Months_Between(To_Date(Aae042, 'yyyymm'), To_Date(Aae041, 'yyyymm')) + 1) * Aae180) From Ac20 Where Aac001 = 1002014776 And Aae140 = '110' And Substr(Aae041, 1, 4) = 1991;
这个例子中就是因为字段aae041的值为199113,月份不应该13.