﻿UPDATE kov SET
  kov.C_OKTATASINEVELESIFELADATTIPUS = akt.C_OKTATASINEVELESIFELADATTIPUS
FROM T_FELADATELLATASIHELY kov
  INNER JOIN T_FELADATELLATASIHELY akt ON kov.ELOZOTANEVIREKORDID = akt.ID
  INNER JOIN T_TANEV t ON t.ID = kov.C_TANEVID AND t.C_NEV = '2018/2019'
WHERE kov.C_OKTATASINEVELESIFELADATTIPUS = 1156
  AND akt.C_OKTATASINEVELESIFELADATTIPUS <> 1156
GO
