@samhita please check this. @PUTHINEEDI RAMOJI RAO The issue is that using the inner join there are two joins happening. May be someone who know sql will update with a better explanation later. The issue is happening during second join and we dont specify a column to join on. It combines with all rows for each row. I dont know how to explain this may be these diagrams will make it clear. Behind the scene Update is a join.
so if we use below query it will be fine as we specify the ON clause for the second join. I know it may be confusing but it comes down to sql concepts
UPDATE `dde-demo-d001.sap_crm.documents_bkup_copy` trg
SET case_guid = ICT.case_guid
FROM `dde-demo-d001.sap_crm.documents_bkup_copy` DFR
INNER JOIN `dde-demo-d001.sap_crm.transactions_bkup` ICT
ON DFR.transaction_header_guid = ICT.transaction_header_guid
WHERE DFR.case_guid IS NULL
AND trg.transaction_header_guid=ICT.transaction_header_guid;