2013-06-06 81 views
-1

我有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; 

回答

2

該異常帶有額外的I有關錯誤的信息。沒有它,我們只能猜測。但是,我可以猜測最後一行的右括號和t都是錯誤的。