/****** Script for SelectTopNRows command from SSMS  ******/
SELECT [id_klaim]
      ,[no_klaim]
      ,[id_item_klaim]
      ,[no_polis]
      ,IndInsurance.dbo.func_fixed_date([tgl_pengajuan]) AS tgl_pengajuan
      ,[id_diagnosa]
      ,[jenis_diagnosa]
      ,[status]
      ,IndInsurance.dbo.func_fixed_date([create_date]) AS create_date
      ,[create_by]
      ,IndInsurance.dbo.func_fixed_date([change_date]) AS change_date
      ,[change_by]
      ,[otorisasi_by]
      ,IndInsurance.dbo.func_fixed_date([otorisasi_date]) AS otorisasi_date
  FROM [IndInsurance].[dbo].[klaim]
WHERE id_diagnosa IN (
    SELECT 
      i.id_diagnosa
    FROM
      IndInsurance.dbo.Diagnosa i INNER JOIN
      GrpInsurance.dbo.Diagnosa g ON i.id_diagnosa=g.Kode
    WHERE i.deskripsi<>g.Diagnosis1
)