﻿UPDATE ic
  SET
     ic.C_ERTEK = 'true'
    ,ic.SERIAL = ic.SERIAL + 1
    ,ic.LASTCHANGED = GETDATE()
    ,ic.MODIFIER = 0
--SELECT *
FROM T_INTEZMENYCONFIG ic
  INNER JOIN T_INTEZMENY i on i.ID = ic.C_INTEZMENYID
  INNER JOIN T_TANEV tv ON tv.C_INTEZMENYID = i.ID AND tv.TOROLT = 'F' AND tv.C_AKTIV = 'T' AND tv.C_NEV = '2021/2022'
  INNER JOIN T_INTEZMENYADATOK ia ON ia.C_TANEVID = tv.ID AND ia.TOROLT = 'F'
WHERE i.TOROLT = 'F'
  AND i.C_ISARCHIV = 'F'
  AND ia.C_ISSZAKKEPZO = 'T'
  AND ic.C_CONFIGTIPUSID = 32
  AND ic.TOROLT = 'F'
  AND ic.C_ERTEK <> 'true'
