我必须从选择中进行更新,我得到了这 2 个包含这些行的表
T1
customer_number | trx number | amount_due_remaining
____________________________________________________
309514 |MM1218881/2011 | 0
309514 |MM1218882/2011 | 0
309514 |MM1218903/2011 | 0
309514 |MM1218905/2011 | 0
T2
contract | numdoc | import
___________________________________
309514 |MM1218881/2011 | 2000,77
309514 |MM1218882/2011 | 1000,45
309514 |MM1218903/2011 | 1000,23
309514 |MM1218905/2011 | 2500,12
我必须将列 amount_due_remaining 的 T1 的值放入 T2 导入
我做这个查询
update dbestrconto T1
SET T1.IMPORTO = (
SELECT nvl(T2.AMOUNT_DUE_REMAINING,0)
FROM XXENE_V_CCML_TRANSACTIONS@XXENE T2
WHERE T2.customer_number=T1.contratto
AND T2.customer_number='3095614'
and T2.TRX_NUMBER=T1.NUMDOC
)
但是错了,请帮帮我。
问候, 鲁道夫