I've one query
UPDATE ccs_hth.khachhang_temp_1 a
SET (ten_tt, ms_thue, diachi_tt, diachi_ct, loaikh_id, donviql_id, ma_nv,
(SELECT NVL (b.ten_tt, a.ten_tt), NVL (b.ms_thue, a.ms_thue),
NVL (b.diachi_tt, a.diachi_tt),
NVL (b.diachi_ct, a.diachi_ct),
NVL (b.loaikh_id, a.loaikh_id),
NVL (b.donviql_id, a.donviql_id), NVL (b.ma_nv, a.ma_nv),
NVL (b.ma_bc, a.ma_bc)
FROM ccs_hth.kh_update b
WHERE b.ma_kh = a.ma_kh)
WHERE a.ma_kh IN (SELECT ma_kh
And I want to use bulk-collect (forall) to re-write it into PL/SQL. But I did not rewrite because it's sub-query.
May you guide me to do it?