命令(oracle)不起作用

时间:2013-06-06 08:13:55

标签: oracle sql-order-by

我有select语句,我需要通过mb.id

添加顺序
SELECT XMLELEMENT (anything)
                        resxml
                FROM PF_M_CNTR_BATCH mb
                     INNER JOIN PF_CNTR_BATCH b ON mb.batch_id = b.batch_id
                     INNER JOIN PF_CONTRACT ct
                        ON mb.CONTRACT_ID = ct.CONTRACT_ID
                     INNER JOIN PF_CLIENT cl
                        ON ct.CLIENT_ID_UCH = cl.CLIENT_ID
                     INNER JOIN PF_FCLIENT fcl
                        ON cl.FCLIENT_ID = fcl.FCLIENT_ID
               WHERE b.batch_id = v_batch_id) t;

我试试,但有错误

  

PLS-00905:NPF.SP_CNTR_BATCH_GET_XML
  ORA-06550:

 FROM PF_M_CNTR_BATCH mb
                         INNER JOIN PF_CNTR_BATCH b ON mb.batch_id = b.batch_id
                         INNER JOIN PF_CONTRACT ct
                            ON mb.CONTRACT_ID = ct.CONTRACT_ID
                         INNER JOIN PF_CLIENT cl
                            ON ct.CLIENT_ID_UCH = cl.CLIENT_ID
                         INNER JOIN PF_FCLIENT fcl
                            ON cl.FCLIENT_ID = fcl.FCLIENT_ID
                   WHERE b.batch_id = v_batch_id ORDER BY mb.ID) t;

1 个答案:

答案 0 :(得分:2)

该异常附带有关错误的其他信息。没有它,我们只能猜测。但是,我可以猜测右括号和最后一行的t都是错误的。