﻿UPDATE T_FELHASZNALOBELEPES
SET C_KOTELEZOVALTOZTATNI = 'F'
  ,MODIFIER = 0
  ,LASTCHANGED = GETDATE()
  ,SERIAL += 1
GO

UPDATE fh
SET fh.C_KOTELEZOVALTOZTATNI = 'T'
  ,MODIFIER = 0
  ,LASTCHANGED = GETDATE()
  ,SERIAL += 1
FROM T_FELHASZNALOBELEPES fh
INNER JOIN T_TANULO tanulo ON tanulo.ID = fh.C_FELHASZNALOID
WHERE fh.C_UTOLSOBELEPES IS NULL
GO
