79025768Update table column based on join in Oracle

Опубликовано: 02 Июль 2026
на канале: Emrah KAYA
No
0

Hello everyone! I hope this video has helped solve your questions and issues. This video is shared because a solution has been found for the question/problem. I create videos for questions that have solutions. If you have any other issues, feel free to reach out to me on Instagram:   / ky.emrah  

Below, you can find the text related to the question/problem. In the video, the question will be presented first, followed by the answers. If the video moves too fast, feel free to pause and review the answers. If you need more detailed information, you can find the necessary sources and links at the bottom of this description. I hope this video has been helpful, and even if it doesn't directly solve your problem, it will guide you to the source of the solution. I'd appreciate it if you like the video and subscribe to my channel!Update table column based on join in Oracle

I have 2 tables like below:
select vsat_detail_id, sap_id, AZIMUTH_GSAT_16 from tbl_vsat_mst_detail_2409 where vsat_detail_id = 104; Table 1
select vsat_detail_id, sap_id, AZIMUTH_GSAT_16 from tbl_vsat_mst_detail_2409 where vsat_detail_id = 104;
select vsat_id, sap_id, azimuth_60_e from tbl_vsat_mst_detail where vsat_id = 104; Table 2
select vsat_id, sap_id, azimuth_60_e from tbl_vsat_mst_detail where vsat_id = 104;
So I am updating like below:-
MERGE
INTO tbl_vsat_mst_detail trg
USING (
SELECT t1.AZIMUTH_GSAT_16 AS rid, t2.azimuth_60_e as code
FROM tbl_vsat_mst_detail_2409 t1
JOIN tbl_vsat_mst_detail t2
ON t1.vsat_detail_id = t2.vsat_id
WHERE t1.vsat_detail_id = 104
) src
ON (trg.rowid = src.rid)
WHEN MATCHED THEN UPDATE
SET trg.value = code;

MERGE
INTO tbl_vsat_mst_detail trg
USING (
SELECT t1.AZIMUTH_GSAT_16 AS rid, t2.azimuth_60_e as code
FROM tbl_vsat_mst_detail_2409 t1
JOIN tbl_vsat_mst_detail t2
ON t1.vsat_detail_id = t2.vsat_id
WHERE t1.vsat_detail_id = 104
) src
ON (trg.rowid = src.rid)
WHEN MATCHED THEN UPDATE
SET trg.value = code;

but nothing is getting updated. Please help


Tags: oracle,join,stored-procedures,sql-mergeSource of the question:
https://stackoverflow.com/questions/7...

Question and source license information:
https://meta.stackexchange.com/help/l...
https://stackoverflow.com/