SELECT
	*
FROM
	dbo.register
WHERE
  no_polis = '13.07856.2'
  
UPDATE
  dbo.register
SET
  id_status = 4,
  ref_no = NULL
WHERE
  id_register = '20160502.2622'

--SELECT
--	*
--FROM
--	dbo.reg_status

SELECT
	*
FROM
	dbo.reg_history
WHERE
  id_register = '20160502.2622'

INSERT INTO
  dbo.reg_history
          (history_date,
           user_assign,
           id_register,
           id_status,
           id_reason,
           remarks)
  VALUES
          (GETDATE(), -- history_date - datetime
           'RAA', -- user_assign - varchar(4)
           '20160502.2622', -- id_register - varchar(13)
           4, -- id_status - tinyint
           0, -- id_reason - tinyint
           ''  -- remarks - varchar(500)
           )

--000001031455