﻿--Migration
UPDATE nkm
SET nkm.C_ADMINALTALTOROLT = 'F'
  ,nkm.SERIAL = nkm.SERIAL + 1
  ,nkm.LASTCHANGED = GETDATE()
  ,nkm.MODIFIER = 0
FROM T_NEMKOTOTTMUNKAIDO_OSSZES nkm
  INNER JOIN T_TANEV_OSSZES tv ON tv.ID = nkm.C_TANEVID
    AND tv.TOROLT = 'F'
    AND tv.C_AKTIV = 'T'
    AND tv.C_SORSZAM = 42 -- 2021/2022 aktív tanéven
WHERE nkm.TOROLT = 'F'
  AND nkm.C_ADMINALTALTOROLT = 'T'
