sql语句
select dd.* from (
select distinct rp.apply_id
from t_r_p rp
where rp.r_status != 1
and rp.apply_id not in(select di.apply_id
from t_d_i di
where di.deduct_type in (1, 2, 3)
and di.deduct_status = 3)
and rp.END_DATE < to_date('2017-07-24','yyyy-mm-dd')
)a
wher rownum <= 500 )dd where dd.rn>0 ;
在Oracle中执行报错:
SQL Error [933] [42000]: ORA-00933: SQL command not properly ended
java.sql.SQLSyntaxErrorException: ORA-00933: SQL命令没有正确结束
到底那个不对了?审查了好几遍,还是错误