ORA-00907: 缺失右括号;代码我在sql运行中都正确,但到了idea中就报错

这代码我在sql运行中都正确,但到了idea中就报错
我觉得是子查询中那个order by的毛病,但分页语法必须有
SELECT PP.EMP_CODE,
E.NAME,
PP.EMP_SEQ_NUM,
PP.ORG_NAME,
PP.EMP_PROPERTY,
PP.EMP_TYPE,
PP.EMP_ORG_ID,
PP.ID
FROM (SELECT T.ID,
T.IS_DELETED,
T.BASE_CODE,
T.EMP_SEQ_NUM,
T.ORG_SEQ_NUM,
T.ORG_NAME,
T.EMP_TYPE,
T.EMP_PROPERTY,
T.CHANGE_DATE,
T.IS_ENABLED,
T.PROCESSED_STATUS,
T.EMP_CODE,
T.EMP_ORG_ID,
T.IS_EFFECTIVE,
ROW_NUMBER() OVER(PARTITION BY T.EMP_SEQ_NUM ORDER BY T.CHANGE_DATE DESC) RN
FROM T_IW_PENDING_PAYMENT T) PP
INNER JOIN T_EP_EMPLOYEE E
ON PP.EMP_SEQ_NUM = E.SEQ_NUM
AND PP.BASE_CODE = E.BASE_CODE
AND E.IS_DELETED = ‘F’
AND PP.EMP_CODE = E.CODE
WHERE PP.IS_DELETED = ‘F’
AND PP.IS_ENABLED = ‘T’
AND PP.PROCESSED_STATUS = ‘F’
AND PP.IS_EFFECTIVE = ‘T’
AND PP.RN = 1
AND PP.EMP_SEQ_NUM IS NOT NULL
AND PP.BASE_CODE = ‘101’

你可能感兴趣的:(ORA-00907: 缺失右括号;代码我在sql运行中都正确,但到了idea中就报错)