SELECT
  pp.Id_Produk,
	kp.*
FROM
	dbo.Klaim_Peserta AS kp INNER JOIN
	dbo.custport_klaim_link AS ckl ON kp.No_Klaim = ckl.no_klaim INNER JOIN
	dbo.Peserta_Produk AS pp ON kp.No_Proposal = pp.No_Proposal
	                            AND kp.No_Peserta = pp.No_Peserta
WHERE
  kp.Status = 'G'
  AND COALESCE(kp.Id_Produk,'') <> pp.Id_Produk
ORDER BY
  kp.No_Klaim


--UPDATE
--  kp
--SET
--  Id_Produk = pp.Id_Produk
--FROM
--	dbo.Klaim_Peserta AS kp INNER JOIN
--	dbo.custport_klaim_link AS ckl ON kp.No_Klaim = ckl.no_klaim INNER JOIN
--	dbo.Peserta_Produk AS pp ON kp.No_Proposal = pp.No_Proposal
--	                            AND kp.No_Peserta = pp.No_Peserta
--WHERE
--  kp.Status = 'G'
--  AND COALESCE(kp.Id_Produk,'') <> pp.Id_Produk