SELECT
	*
FROM
	dbo.KlaimFrom_Header
WHERE
  Provider_Code = 'NPK'
  AND App_By = 'RXUMMI'

--DELETE
--FROM
--	dbo.KlaimFrom_Header
--WHERE
--  Provider_Code = 'NPK'
--  AND App_By = 'RXUMMI'

  
SELECT
	*
FROM
	dbo.KlaimFrom_Detail
WHERE
  Claim_Ref IN (
                SELECT
	                Claim_Ref
                FROM
	                dbo.KlaimFrom_Header
                WHERE
                  Provider_Code = 'NPK'
                  AND App_By = 'RXUMMI'
               )
--DELETE
--FROM
--	dbo.KlaimFrom_Detail
--WHERE
--  Claim_Ref IN (
--                SELECT
--	                Claim_Ref
--                FROM
--	                dbo.KlaimFrom_Header
--                WHERE
--                  Provider_Code = 'NPK'
--                  AND App_By = 'RXUMMI'
--               )
               