SELECT
  TOP 10 *
FROM
  dbo.Klaim_Ref_Master
ORDER BY
  No_Ref DESC
WHERE
  Create_Date='2014-09-16'
  
SELECT
  TOP 10 *
FROM
  dbo.Klaim_Ref_Detail
ORDER BY
  No_Ref DESC
WHERE
  Create_Date='2014-09-16'
  
SELECT
  *
FROM
  dbo.Note_Terbit_Master
WHERE
  Create_Date='2014-09-16'

SELECT
  TOP 10 *
FROM
  dbo.Note_Terbit_Detail
WHERE
  Create_Date='2014-09-16'

SELECT
  *
FROM
  dbo.Klaim_Peserta
WHERE
  Create_Date='2014-09-16'
-----------------------------------
SELECT
  *
FROM
  dbo.Klaim_Peserta
WHERE
  Create_Date>='2014-09-15'
  AND Status='I'
  AND Id_RegKlaim IS NULL
-----------------------------------------
SELECT
  krm.No_Klaim,
  k.Id_RegKlaim,
  ntm.id_dokumen_terima
FROM
  dbo.Note_Terbit_Master AS ntm INNER JOIN
  dbo.Klaim_Ref_Master AS krm ON ntm.No_Ref = krm.No_Ref INNER JOIN
  dbo.Klaim_Peserta AS k ON krm.No_Klaim = k.No_Klaim
WHERE
  ntm.Create_Date >= '2014-09-15'
  AND k.Status = 'I'
  AND k.Id_RegKlaim IS NULL
ORDER BY
  ntm.id_dokumen_terima
  
--UPDATE
--  k
--SET
--  k.Id_RegKlaim = ntm.id_dokumen_terima
--FROM
--  dbo.Note_Terbit_Master AS ntm INNER JOIN
--  dbo.Klaim_Ref_Master AS krm ON ntm.No_Ref = krm.No_Ref INNER JOIN
--  dbo.Klaim_Peserta AS k ON krm.No_Klaim = k.No_Klaim
--WHERE
--  ntm.Create_Date >= '2014-09-15'
--  AND k.Status = 'I'
--  AND k.Id_RegKlaim IS NULL