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