//刚刚看到了Oracle9.2需要打补丁。不知道会不会是Oracle9.2的bug
//见:http://community.csdn.net/Expert/topic/3366/3366620.xml?temp=.580166

解决方案 »

  1.   

    try:
    select * from table1
    where trunc(months_between(to_date('2005-7-1', 'yyyy-mm-dd'), to_date(concat(field1, '01'), 'yyyy-mm-dd'))) < 12 and field1 <> '999999';
      

  2.   

    Oracle是从后面开始选条件剔除数据的吗?
      

  3.   

    试试
    select *
      from table1
     where months_between(to_date('2005-7-1', 'yyyy-mm-dd'),
                          to_date(concat(field1, '01'), 'yyyy-mm-dd')) < 12
       and field1 != '999999';