我有选择语句,我需要按 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;