ORA-01719: OR 或 IN 操作数中不允许外部连接运算符 (+):
sql语句:
select JudgeMent.Aid,JudgeMent.CaseNum,JudgeMent.larq,JudgeMent.slqx,JudgeMent.barq,JudgeMent.fj,JudgeMent.isyqsl,JudgeMent.yqyy,JudgeMent.Xgsj,JudgeMent.Ispt,t_status.meaning from JudgeMent,t_status where 1=1 and JudgeMent.Status=t_status.code(+) and status=9 and judgement.zsr='aaa' or judgement.dlspy='aaa' and rownum<=500 order by AID desc;
如何解决这个问题呢?
------解决方法--------------------------------------------------------
select *
from (
select judgement.zsr, judgement.dlspy, JudgeMent.Aid,JudgeMent.CaseNum,JudgeMent.larq,JudgeMent.slqx,JudgeMent.barq,JudgeMent.fj,JudgeMent.isyqsl,JudgeMent.yqyy,JudgeMent.Xgsj,JudgeMent.Ispt,t_status.meaning from JudgeMent,t_status where 1=1 and JudgeMent.Status=t_status.code(+) and status=9
)
where zsr='aaa' or dlspy='aaa' and rownum<=500 order by AID desc;