﻿
DROP TABLE IF EXISTS tmpForSwitchDictionaryItemBase 
CREATE TABLE tmpForSwitchDictionaryItemBase(RegiID int, UjID int, TanevID int, C_NAME nvarchar(500), C_TYPE nvarchar(64))
DECLARE @TEMP_EnvironmentName nvarchar(1000) 
SET @TEMP_EnvironmentName = (SELECT TOP 1 [Value] 
FROM dev.EnvironmentInfo WHERE [Key] = 'Kornyezet')
 IF @TEMP_EnvironmentName = 'KK'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 6572, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'VezetoiOraszamokTipus' AND DIB.C_NAME = N'intézményvezető' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'VezetoiOraszamokTipus' AND DIB.C_NAME = N'intézményvezető' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'intézményvezető' 
    ,DIB.C_TYPE = N'VezetoiOraszamokTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 6572;
  END IF @TEMP_EnvironmentName = 'NSZFH'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 6572, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'VezetoiOraszamokTipus' AND DIB.C_NAME = N'intézményvezető' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'VezetoiOraszamokTipus' AND DIB.C_NAME = N'intézményvezető' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'intézményvezető' 
    ,DIB.C_TYPE = N'VezetoiOraszamokTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 6572;
  END IF @TEMP_EnvironmentName = 'HOI'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 6572, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'VezetoiOraszamokTipus' AND DIB.C_NAME = N'intézményvezető' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'VezetoiOraszamokTipus' AND DIB.C_NAME = N'intézményvezető' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'intézményvezető' 
    ,DIB.C_TYPE = N'VezetoiOraszamokTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 6572;
  END IF @TEMP_EnvironmentName = 'AZURE'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 6572, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'VezetoiOraszamokTipus' AND DIB.C_NAME = N'intézményvezető' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'VezetoiOraszamokTipus' AND DIB.C_NAME = N'intézményvezető' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'intézményvezető' 
    ,DIB.C_TYPE = N'VezetoiOraszamokTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 6572;
  END IF @TEMP_EnvironmentName = 'KK'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 6573, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'VezetoiOraszamokTipus' AND DIB.C_NAME = N'tagintézmény-vezető' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'VezetoiOraszamokTipus' AND DIB.C_NAME = N'tagintézmény-vezető' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'tagintézmény-vezető' 
    ,DIB.C_TYPE = N'VezetoiOraszamokTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 6573;
  END IF @TEMP_EnvironmentName = 'NSZFH'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 6573, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'VezetoiOraszamokTipus' AND DIB.C_NAME = N'tagintézmény-vezető' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'VezetoiOraszamokTipus' AND DIB.C_NAME = N'tagintézmény-vezető' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'tagintézmény-vezető' 
    ,DIB.C_TYPE = N'VezetoiOraszamokTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 6573;
  END IF @TEMP_EnvironmentName = 'HOI'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 6573, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'VezetoiOraszamokTipus' AND DIB.C_NAME = N'tagintézmény-vezető' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'VezetoiOraszamokTipus' AND DIB.C_NAME = N'tagintézmény-vezető' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'tagintézmény-vezető' 
    ,DIB.C_TYPE = N'VezetoiOraszamokTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 6573;
  END IF @TEMP_EnvironmentName = 'AZURE'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 6573, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'VezetoiOraszamokTipus' AND DIB.C_NAME = N'tagintézmény-vezető' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'VezetoiOraszamokTipus' AND DIB.C_NAME = N'tagintézmény-vezető' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'tagintézmény-vezető' 
    ,DIB.C_TYPE = N'VezetoiOraszamokTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 6573;
  END IF @TEMP_EnvironmentName = 'KK'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 6575, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'VezetoiOraszamokTipus' AND DIB.C_NAME = N'intézményvezető-helyettes' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'VezetoiOraszamokTipus' AND DIB.C_NAME = N'intézményvezető-helyettes' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'intézményvezető-helyettes' 
    ,DIB.C_TYPE = N'VezetoiOraszamokTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 6575;
  END IF @TEMP_EnvironmentName = 'NSZFH'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 6575, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'VezetoiOraszamokTipus' AND DIB.C_NAME = N'intézményvezető-helyettes' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'VezetoiOraszamokTipus' AND DIB.C_NAME = N'intézményvezető-helyettes' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'intézményvezető-helyettes' 
    ,DIB.C_TYPE = N'VezetoiOraszamokTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 6575;
  END IF @TEMP_EnvironmentName = 'HOI'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 6575, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'VezetoiOraszamokTipus' AND DIB.C_NAME = N'intézményvezető-helyettes' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'VezetoiOraszamokTipus' AND DIB.C_NAME = N'intézményvezető-helyettes' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'intézményvezető-helyettes' 
    ,DIB.C_TYPE = N'VezetoiOraszamokTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 6575;
  END IF @TEMP_EnvironmentName = 'AZURE'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 6575, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'VezetoiOraszamokTipus' AND DIB.C_NAME = N'intézményvezető-helyettes' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'VezetoiOraszamokTipus' AND DIB.C_NAME = N'intézményvezető-helyettes' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'intézményvezető-helyettes' 
    ,DIB.C_TYPE = N'VezetoiOraszamokTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 6575;
  END IF @TEMP_EnvironmentName = 'KK'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 6576, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'VezetoiOraszamokTipus' AND DIB.C_NAME = N'tagintézményvezető-helyettes' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'VezetoiOraszamokTipus' AND DIB.C_NAME = N'tagintézményvezető-helyettes' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'tagintézményvezető-helyettes' 
    ,DIB.C_TYPE = N'VezetoiOraszamokTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 6576;
  END IF @TEMP_EnvironmentName = 'NSZFH'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 6576, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'VezetoiOraszamokTipus' AND DIB.C_NAME = N'tagintézményvezető-helyettes' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'VezetoiOraszamokTipus' AND DIB.C_NAME = N'tagintézményvezető-helyettes' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'tagintézményvezető-helyettes' 
    ,DIB.C_TYPE = N'VezetoiOraszamokTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 6576;
  END IF @TEMP_EnvironmentName = 'HOI'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 6576, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'VezetoiOraszamokTipus' AND DIB.C_NAME = N'tagintézményvezető-helyettes' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'VezetoiOraszamokTipus' AND DIB.C_NAME = N'tagintézményvezető-helyettes' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'tagintézményvezető-helyettes' 
    ,DIB.C_TYPE = N'VezetoiOraszamokTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 6576;
  END IF @TEMP_EnvironmentName = 'AZURE'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 6576, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'VezetoiOraszamokTipus' AND DIB.C_NAME = N'tagintézményvezető-helyettes' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'VezetoiOraszamokTipus' AND DIB.C_NAME = N'tagintézményvezető-helyettes' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'tagintézményvezető-helyettes' 
    ,DIB.C_TYPE = N'VezetoiOraszamokTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 6576;
  END IF @TEMP_EnvironmentName = 'KK'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 6578, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'VezetoiOraszamokTipus' AND DIB.C_NAME = N'gyakorlati oktatásvezető' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'VezetoiOraszamokTipus' AND DIB.C_NAME = N'gyakorlati oktatásvezető' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'gyakorlati oktatásvezető' 
    ,DIB.C_TYPE = N'VezetoiOraszamokTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 6578;
  END IF @TEMP_EnvironmentName = 'NSZFH'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 6578, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'VezetoiOraszamokTipus' AND DIB.C_NAME = N'gyakorlati oktatásvezető' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'VezetoiOraszamokTipus' AND DIB.C_NAME = N'gyakorlati oktatásvezető' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'gyakorlati oktatásvezető' 
    ,DIB.C_TYPE = N'VezetoiOraszamokTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 6578;
  END IF @TEMP_EnvironmentName = 'HOI'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 6578, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'VezetoiOraszamokTipus' AND DIB.C_NAME = N'gyakorlati oktatásvezető' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'VezetoiOraszamokTipus' AND DIB.C_NAME = N'gyakorlati oktatásvezető' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'gyakorlati oktatásvezető' 
    ,DIB.C_TYPE = N'VezetoiOraszamokTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 6578;
  END IF @TEMP_EnvironmentName = 'AZURE'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 6578, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'VezetoiOraszamokTipus' AND DIB.C_NAME = N'gyakorlati oktatásvezető' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'VezetoiOraszamokTipus' AND DIB.C_NAME = N'gyakorlati oktatásvezető' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'gyakorlati oktatásvezető' 
    ,DIB.C_TYPE = N'VezetoiOraszamokTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 6578;
  END IF @TEMP_EnvironmentName = 'KK'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 7758, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'VezetoiOraszamokTipus' AND DIB.C_NAME = N'főigazgató' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'VezetoiOraszamokTipus' AND DIB.C_NAME = N'főigazgató' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'főigazgató' 
    ,DIB.C_TYPE = N'VezetoiOraszamokTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 7758;
  END IF @TEMP_EnvironmentName = 'NSZFH'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 7758, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'VezetoiOraszamokTipus' AND DIB.C_NAME = N'főigazgató' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'VezetoiOraszamokTipus' AND DIB.C_NAME = N'főigazgató' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'főigazgató' 
    ,DIB.C_TYPE = N'VezetoiOraszamokTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 7758;
  END IF @TEMP_EnvironmentName = 'HOI'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 7758, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'VezetoiOraszamokTipus' AND DIB.C_NAME = N'főigazgató' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'VezetoiOraszamokTipus' AND DIB.C_NAME = N'főigazgató' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'főigazgató' 
    ,DIB.C_TYPE = N'VezetoiOraszamokTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 7758;
  END IF @TEMP_EnvironmentName = 'AZURE'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 7758, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'VezetoiOraszamokTipus' AND DIB.C_NAME = N'főigazgató' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'VezetoiOraszamokTipus' AND DIB.C_NAME = N'főigazgató' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'főigazgató' 
    ,DIB.C_TYPE = N'VezetoiOraszamokTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 7758;
  END IF @TEMP_EnvironmentName = 'KK'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 7599, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'VezetoiOraszamokTipus' AND DIB.C_NAME = N'másik KRÉTA rendszerben vezető' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'VezetoiOraszamokTipus' AND DIB.C_NAME = N'másik KRÉTA rendszerben vezető' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'másik KRÉTA rendszerben vezető' 
    ,DIB.C_TYPE = N'VezetoiOraszamokTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 7599;
  END IF @TEMP_EnvironmentName = 'NSZFH'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 7599, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'VezetoiOraszamokTipus' AND DIB.C_NAME = N'másik KRÉTA rendszerben vezető' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'VezetoiOraszamokTipus' AND DIB.C_NAME = N'másik KRÉTA rendszerben vezető' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'másik KRÉTA rendszerben vezető' 
    ,DIB.C_TYPE = N'VezetoiOraszamokTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 7599;
  END IF @TEMP_EnvironmentName = 'HOI'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 7599, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'VezetoiOraszamokTipus' AND DIB.C_NAME = N'másik KRÉTA rendszerben vezető' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'VezetoiOraszamokTipus' AND DIB.C_NAME = N'másik KRÉTA rendszerben vezető' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'másik KRÉTA rendszerben vezető' 
    ,DIB.C_TYPE = N'VezetoiOraszamokTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 7599;
  END IF @TEMP_EnvironmentName = 'AZURE'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 7599, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'VezetoiOraszamokTipus' AND DIB.C_NAME = N'másik KRÉTA rendszerben vezető' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'VezetoiOraszamokTipus' AND DIB.C_NAME = N'másik KRÉTA rendszerben vezető' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'másik KRÉTA rendszerben vezető' 
    ,DIB.C_TYPE = N'VezetoiOraszamokTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 7599;
  END IF @TEMP_EnvironmentName = 'KK'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 7854, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'VezetoiOraszamokTipus' AND DIB.C_NAME = N'főigazgató-helyettes' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'VezetoiOraszamokTipus' AND DIB.C_NAME = N'főigazgató-helyettes' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'főigazgató-helyettes' 
    ,DIB.C_TYPE = N'VezetoiOraszamokTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 7854;
  END IF @TEMP_EnvironmentName = 'NSZFH'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 7854, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'VezetoiOraszamokTipus' AND DIB.C_NAME = N'főigazgató-helyettes' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'VezetoiOraszamokTipus' AND DIB.C_NAME = N'főigazgató-helyettes' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'főigazgató-helyettes' 
    ,DIB.C_TYPE = N'VezetoiOraszamokTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 7854;
  END IF @TEMP_EnvironmentName = 'HOI'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 7854, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'VezetoiOraszamokTipus' AND DIB.C_NAME = N'főigazgató-helyettes' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'VezetoiOraszamokTipus' AND DIB.C_NAME = N'főigazgató-helyettes' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'főigazgató-helyettes' 
    ,DIB.C_TYPE = N'VezetoiOraszamokTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 7854;
  END IF @TEMP_EnvironmentName = 'AZURE'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 7854, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'VezetoiOraszamokTipus' AND DIB.C_NAME = N'főigazgató-helyettes' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'VezetoiOraszamokTipus' AND DIB.C_NAME = N'főigazgató-helyettes' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'főigazgató-helyettes' 
    ,DIB.C_TYPE = N'VezetoiOraszamokTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 7854;
  END IF @TEMP_EnvironmentName = 'KK'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 3069, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Osztályfőnök' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Osztályfőnök' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'Osztályfőnök' 
    ,DIB.C_TYPE = N'MunkaidoKedvezmenyOka' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 3069;
  END IF @TEMP_EnvironmentName = 'NSZFH'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 3069, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Osztályfőnök' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Osztályfőnök' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'Osztályfőnök' 
    ,DIB.C_TYPE = N'MunkaidoKedvezmenyOka' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 3069;
  END IF @TEMP_EnvironmentName = 'HOI'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 3069, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Osztályfőnök' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Osztályfőnök' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'Osztályfőnök' 
    ,DIB.C_TYPE = N'MunkaidoKedvezmenyOka' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 3069;
  END IF @TEMP_EnvironmentName = 'AZURE'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 3069, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Osztályfőnök' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Osztályfőnök' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'Osztályfőnök' 
    ,DIB.C_TYPE = N'MunkaidoKedvezmenyOka' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 3069;
  END IF @TEMP_EnvironmentName = 'KK'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 3072, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Osztályfőnök és Munkaközösség-vezető' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Osztályfőnök és Munkaközösség-vezető' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'Osztályfőnök és Munkaközösség-vezető' 
    ,DIB.C_TYPE = N'MunkaidoKedvezmenyOka' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 3072;
  END IF @TEMP_EnvironmentName = 'NSZFH'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 3072, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Osztályfőnök és Munkaközösség-vezető' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Osztályfőnök és Munkaközösség-vezető' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'Osztályfőnök és Munkaközösség-vezető' 
    ,DIB.C_TYPE = N'MunkaidoKedvezmenyOka' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 3072;
  END IF @TEMP_EnvironmentName = 'HOI'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 3072, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Osztályfőnök és Munkaközösség-vezető' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Osztályfőnök és Munkaközösség-vezető' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'Osztályfőnök és Munkaközösség-vezető' 
    ,DIB.C_TYPE = N'MunkaidoKedvezmenyOka' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 3072;
  END IF @TEMP_EnvironmentName = 'AZURE'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 3072, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Osztályfőnök és Munkaközösség-vezető' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Osztályfőnök és Munkaközösség-vezető' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'Osztályfőnök és Munkaközösség-vezető' 
    ,DIB.C_TYPE = N'MunkaidoKedvezmenyOka' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 3072;
  END IF @TEMP_EnvironmentName = 'KK'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 6483, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Osztályfőnök és Diákönkormányzati munkát segítő' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Osztályfőnök és Diákönkormányzati munkát segítő' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'Osztályfőnök és Diákönkormányzati munkát segítő' 
    ,DIB.C_TYPE = N'MunkaidoKedvezmenyOka' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 6483;
  END IF @TEMP_EnvironmentName = 'NSZFH'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 6483, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Osztályfőnök és Diákönkormányzati munkát segítő' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Osztályfőnök és Diákönkormányzati munkát segítő' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'Osztályfőnök és Diákönkormányzati munkát segítő' 
    ,DIB.C_TYPE = N'MunkaidoKedvezmenyOka' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 6483;
  END IF @TEMP_EnvironmentName = 'HOI'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 6483, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Osztályfőnök és Diákönkormányzati munkát segítő' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Osztályfőnök és Diákönkormányzati munkát segítő' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'Osztályfőnök és Diákönkormányzati munkát segítő' 
    ,DIB.C_TYPE = N'MunkaidoKedvezmenyOka' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 6483;
  END IF @TEMP_EnvironmentName = 'AZURE'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 6483, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Osztályfőnök és Diákönkormányzati munkát segítő' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Osztályfőnök és Diákönkormányzati munkát segítő' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'Osztályfőnök és Diákönkormányzati munkát segítő' 
    ,DIB.C_TYPE = N'MunkaidoKedvezmenyOka' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 6483;
  END IF @TEMP_EnvironmentName = 'KK'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 6484, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Diákönkormányzati munkát segítő és Munkaközösség-vezető' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Diákönkormányzati munkát segítő és Munkaközösség-vezető' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'Diákönkormányzati munkát segítő és Munkaközösség-vezető' 
    ,DIB.C_TYPE = N'MunkaidoKedvezmenyOka' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 6484;
  END IF @TEMP_EnvironmentName = 'NSZFH'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 6484, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Diákönkormányzati munkát segítő és Munkaközösség-vezető' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Diákönkormányzati munkát segítő és Munkaközösség-vezető' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'Diákönkormányzati munkát segítő és Munkaközösség-vezető' 
    ,DIB.C_TYPE = N'MunkaidoKedvezmenyOka' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 6484;
  END IF @TEMP_EnvironmentName = 'HOI'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 6484, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Diákönkormányzati munkát segítő és Munkaközösség-vezető' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Diákönkormányzati munkát segítő és Munkaközösség-vezető' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'Diákönkormányzati munkát segítő és Munkaközösség-vezető' 
    ,DIB.C_TYPE = N'MunkaidoKedvezmenyOka' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 6484;
  END IF @TEMP_EnvironmentName = 'AZURE'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 6484, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Diákönkormányzati munkát segítő és Munkaközösség-vezető' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Diákönkormányzati munkát segítő és Munkaközösség-vezető' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'Diákönkormányzati munkát segítő és Munkaközösség-vezető' 
    ,DIB.C_TYPE = N'MunkaidoKedvezmenyOka' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 6484;
  END IF @TEMP_EnvironmentName = 'KK'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 6485, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Osztályfőnök és Diákönkormányzati munkát segítő és Munkaközösség-vezető' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Osztályfőnök és Diákönkormányzati munkát segítő és Munkaközösség-vezető' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'Osztályfőnök és Diákönkormányzati munkát segítő és Munkaközösség-vezető' 
    ,DIB.C_TYPE = N'MunkaidoKedvezmenyOka' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 6485;
  END IF @TEMP_EnvironmentName = 'NSZFH'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 6485, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Osztályfőnök és Diákönkormányzati munkát segítő és Munkaközösség-vezető' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Osztályfőnök és Diákönkormányzati munkát segítő és Munkaközösség-vezető' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'Osztályfőnök és Diákönkormányzati munkát segítő és Munkaközösség-vezető' 
    ,DIB.C_TYPE = N'MunkaidoKedvezmenyOka' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 6485;
  END IF @TEMP_EnvironmentName = 'HOI'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 6485, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Osztályfőnök és Diákönkormányzati munkát segítő és Munkaközösség-vezető' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Osztályfőnök és Diákönkormányzati munkát segítő és Munkaközösség-vezető' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'Osztályfőnök és Diákönkormányzati munkát segítő és Munkaközösség-vezető' 
    ,DIB.C_TYPE = N'MunkaidoKedvezmenyOka' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 6485;
  END IF @TEMP_EnvironmentName = 'AZURE'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 6485, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Osztályfőnök és Diákönkormányzati munkát segítő és Munkaközösség-vezető' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Osztályfőnök és Diákönkormányzati munkát segítő és Munkaközösség-vezető' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'Osztályfőnök és Diákönkormányzati munkát segítő és Munkaközösség-vezető' 
    ,DIB.C_TYPE = N'MunkaidoKedvezmenyOka' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 6485;
  END IF @TEMP_EnvironmentName = 'KK'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 3073, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Egyéb' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Egyéb' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'Egyéb' 
    ,DIB.C_TYPE = N'MunkaidoKedvezmenyOka' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 3073;
  END IF @TEMP_EnvironmentName = 'NSZFH'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 3073, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Egyéb' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Egyéb' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'Egyéb' 
    ,DIB.C_TYPE = N'MunkaidoKedvezmenyOka' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 3073;
  END IF @TEMP_EnvironmentName = 'HOI'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 3073, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Egyéb' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Egyéb' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'Egyéb' 
    ,DIB.C_TYPE = N'MunkaidoKedvezmenyOka' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 3073;
  END IF @TEMP_EnvironmentName = 'AZURE'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 3073, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Egyéb' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Egyéb' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'Egyéb' 
    ,DIB.C_TYPE = N'MunkaidoKedvezmenyOka' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 3073;
  END IF @TEMP_EnvironmentName = 'KK'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 6971, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Osztályfőnök és Egyéb' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Osztályfőnök és Egyéb' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'Osztályfőnök és Egyéb' 
    ,DIB.C_TYPE = N'MunkaidoKedvezmenyOka' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 6971;
  END IF @TEMP_EnvironmentName = 'NSZFH'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 6971, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Osztályfőnök és Egyéb' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Osztályfőnök és Egyéb' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'Osztályfőnök és Egyéb' 
    ,DIB.C_TYPE = N'MunkaidoKedvezmenyOka' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 6971;
  END IF @TEMP_EnvironmentName = 'HOI'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 6971, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Osztályfőnök és Egyéb' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Osztályfőnök és Egyéb' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'Osztályfőnök és Egyéb' 
    ,DIB.C_TYPE = N'MunkaidoKedvezmenyOka' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 6971;
  END IF @TEMP_EnvironmentName = 'AZURE'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 6971, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Osztályfőnök és Egyéb' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Osztályfőnök és Egyéb' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'Osztályfőnök és Egyéb' 
    ,DIB.C_TYPE = N'MunkaidoKedvezmenyOka' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 6971;
  END IF @TEMP_EnvironmentName = 'KK'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 6972, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Munkaközösség-vezető és Egyéb' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Munkaközösség-vezető és Egyéb' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'Munkaközösség-vezető és Egyéb' 
    ,DIB.C_TYPE = N'MunkaidoKedvezmenyOka' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 6972;
  END IF @TEMP_EnvironmentName = 'NSZFH'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 6972, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Munkaközösség-vezető és Egyéb' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Munkaközösség-vezető és Egyéb' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'Munkaközösség-vezető és Egyéb' 
    ,DIB.C_TYPE = N'MunkaidoKedvezmenyOka' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 6972;
  END IF @TEMP_EnvironmentName = 'HOI'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 6972, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Munkaközösség-vezető és Egyéb' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Munkaközösség-vezető és Egyéb' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'Munkaközösség-vezető és Egyéb' 
    ,DIB.C_TYPE = N'MunkaidoKedvezmenyOka' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 6972;
  END IF @TEMP_EnvironmentName = 'AZURE'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 6972, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Munkaközösség-vezető és Egyéb' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Munkaközösség-vezető és Egyéb' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'Munkaközösség-vezető és Egyéb' 
    ,DIB.C_TYPE = N'MunkaidoKedvezmenyOka' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 6972;
  END IF @TEMP_EnvironmentName = 'KK'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 6973, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Diákönkormányzati munkát segítő és Egyéb' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Diákönkormányzati munkát segítő és Egyéb' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'Diákönkormányzati munkát segítő és Egyéb' 
    ,DIB.C_TYPE = N'MunkaidoKedvezmenyOka' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 6973;
  END IF @TEMP_EnvironmentName = 'NSZFH'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 6973, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Diákönkormányzati munkát segítő és Egyéb' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Diákönkormányzati munkát segítő és Egyéb' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'Diákönkormányzati munkát segítő és Egyéb' 
    ,DIB.C_TYPE = N'MunkaidoKedvezmenyOka' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 6973;
  END IF @TEMP_EnvironmentName = 'HOI'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 6973, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Diákönkormányzati munkát segítő és Egyéb' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Diákönkormányzati munkát segítő és Egyéb' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'Diákönkormányzati munkát segítő és Egyéb' 
    ,DIB.C_TYPE = N'MunkaidoKedvezmenyOka' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 6973;
  END IF @TEMP_EnvironmentName = 'AZURE'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 6973, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Diákönkormányzati munkát segítő és Egyéb' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Diákönkormányzati munkát segítő és Egyéb' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'Diákönkormányzati munkát segítő és Egyéb' 
    ,DIB.C_TYPE = N'MunkaidoKedvezmenyOka' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 6973;
  END IF @TEMP_EnvironmentName = 'KK'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 7798, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Tanszakvezető' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Tanszakvezető' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'Tanszakvezető' 
    ,DIB.C_TYPE = N'MunkaidoKedvezmenyOka' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 7798;
  END IF @TEMP_EnvironmentName = 'NSZFH'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 7798, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Tanszakvezető' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Tanszakvezető' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'Tanszakvezető' 
    ,DIB.C_TYPE = N'MunkaidoKedvezmenyOka' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 7798;
  END IF @TEMP_EnvironmentName = 'HOI'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 7798, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Tanszakvezető' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Tanszakvezető' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'Tanszakvezető' 
    ,DIB.C_TYPE = N'MunkaidoKedvezmenyOka' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 7798;
  END IF @TEMP_EnvironmentName = 'AZURE'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 7798, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Tanszakvezető' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Tanszakvezető' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'Tanszakvezető' 
    ,DIB.C_TYPE = N'MunkaidoKedvezmenyOka' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 7798;
  END IF @TEMP_EnvironmentName = 'KK'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 7799, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Tanszakvezető és Munkaközösség-vezető' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Tanszakvezető és Munkaközösség-vezető' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'Tanszakvezető és Munkaközösség-vezető' 
    ,DIB.C_TYPE = N'MunkaidoKedvezmenyOka' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 7799;
  END IF @TEMP_EnvironmentName = 'NSZFH'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 7799, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Tanszakvezető és Munkaközösség-vezető' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Tanszakvezető és Munkaközösség-vezető' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'Tanszakvezető és Munkaközösség-vezető' 
    ,DIB.C_TYPE = N'MunkaidoKedvezmenyOka' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 7799;
  END IF @TEMP_EnvironmentName = 'HOI'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 7799, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Tanszakvezető és Munkaközösség-vezető' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Tanszakvezető és Munkaközösség-vezető' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'Tanszakvezető és Munkaközösség-vezető' 
    ,DIB.C_TYPE = N'MunkaidoKedvezmenyOka' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 7799;
  END IF @TEMP_EnvironmentName = 'AZURE'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 7799, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Tanszakvezető és Munkaközösség-vezető' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkaidoKedvezmenyOka' AND DIB.C_NAME = N'Tanszakvezető és Munkaközösség-vezető' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'Tanszakvezető és Munkaközösség-vezető' 
    ,DIB.C_TYPE = N'MunkaidoKedvezmenyOka' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 7799;
  END IF @TEMP_EnvironmentName = 'KK'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 566, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'NOKS ápoló (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'NOKS ápoló (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'NOKS ápoló (*)' 
    ,DIB.C_TYPE = N'MunkakorTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 566;
  END IF @TEMP_EnvironmentName = 'NSZFH'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 566, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'TOVÁBBI ápoló (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'TOVÁBBI ápoló (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'TOVÁBBI ápoló (*)' 
    ,DIB.C_TYPE = N'MunkakorTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 566;
  END IF @TEMP_EnvironmentName = 'HOI'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 566, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'NOKS ápoló (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'NOKS ápoló (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'NOKS ápoló (*)' 
    ,DIB.C_TYPE = N'MunkakorTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 566;
  END IF @TEMP_EnvironmentName = 'AZURE'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 566, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'NOKS ápoló (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'NOKS ápoló (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'NOKS ápoló (*)' 
    ,DIB.C_TYPE = N'MunkakorTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 566;
  END IF @TEMP_EnvironmentName = 'KK'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 561, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'NOKS gondozónő és takarító (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'NOKS gondozónő és takarító (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'NOKS gondozónő és takarító (*)' 
    ,DIB.C_TYPE = N'MunkakorTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 561;
  END IF @TEMP_EnvironmentName = 'NSZFH'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 561, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'TOVÁBBI gondozónő és takarító (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'TOVÁBBI gondozónő és takarító (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'TOVÁBBI gondozónő és takarító (*)' 
    ,DIB.C_TYPE = N'MunkakorTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 561;
  END IF @TEMP_EnvironmentName = 'HOI'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 561, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'NOKS gondozónő és takarító (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'NOKS gondozónő és takarító (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'NOKS gondozónő és takarító (*)' 
    ,DIB.C_TYPE = N'MunkakorTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 561;
  END IF @TEMP_EnvironmentName = 'AZURE'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 561, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'NOKS gondozónő és takarító (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'NOKS gondozónő és takarító (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'NOKS gondozónő és takarító (*)' 
    ,DIB.C_TYPE = N'MunkakorTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 561;
  END IF @TEMP_EnvironmentName = 'KK'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 563, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'NOKS gyermek- és ifjúságvédelmi felügyelő (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'NOKS gyermek- és ifjúságvédelmi felügyelő (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'NOKS gyermek- és ifjúságvédelmi felügyelő (*)' 
    ,DIB.C_TYPE = N'MunkakorTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 563;
  END IF @TEMP_EnvironmentName = 'NSZFH'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 563, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'TOVÁBBI gyermek- és ifjúságvédelmi felügyelő (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'TOVÁBBI gyermek- és ifjúságvédelmi felügyelő (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'TOVÁBBI gyermek- és ifjúságvédelmi felügyelő (*)' 
    ,DIB.C_TYPE = N'MunkakorTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 563;
  END IF @TEMP_EnvironmentName = 'HOI'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 563, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'NOKS gyermek- és ifjúságvédelmi felügyelő (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'NOKS gyermek- és ifjúságvédelmi felügyelő (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'NOKS gyermek- és ifjúságvédelmi felügyelő (*)' 
    ,DIB.C_TYPE = N'MunkakorTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 563;
  END IF @TEMP_EnvironmentName = 'AZURE'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 563, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'NOKS gyermek- és ifjúságvédelmi felügyelő (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'NOKS gyermek- és ifjúságvédelmi felügyelő (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'NOKS gyermek- és ifjúságvédelmi felügyelő (*)' 
    ,DIB.C_TYPE = N'MunkakorTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 563;
  END IF @TEMP_EnvironmentName = 'KK'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 559, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'NOKS gyógypedagógiai asszisztens (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'NOKS gyógypedagógiai asszisztens (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'NOKS gyógypedagógiai asszisztens (*)' 
    ,DIB.C_TYPE = N'MunkakorTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 559;
  END IF @TEMP_EnvironmentName = 'NSZFH'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 559, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'TOVÁBBI gyógypedagógiai asszisztens (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'TOVÁBBI gyógypedagógiai asszisztens (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'TOVÁBBI gyógypedagógiai asszisztens (*)' 
    ,DIB.C_TYPE = N'MunkakorTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 559;
  END IF @TEMP_EnvironmentName = 'HOI'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 559, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'NOKS gyógypedagógiai asszisztens (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'NOKS gyógypedagógiai asszisztens (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'NOKS gyógypedagógiai asszisztens (*)' 
    ,DIB.C_TYPE = N'MunkakorTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 559;
  END IF @TEMP_EnvironmentName = 'AZURE'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 559, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'NOKS gyógypedagógiai asszisztens (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'NOKS gyógypedagógiai asszisztens (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'NOKS gyógypedagógiai asszisztens (*)' 
    ,DIB.C_TYPE = N'MunkakorTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 559;
  END IF @TEMP_EnvironmentName = 'KK'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 584, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'NOKS iskolatitkár (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'NOKS iskolatitkár (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'NOKS iskolatitkár (*)' 
    ,DIB.C_TYPE = N'MunkakorTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 584;
  END IF @TEMP_EnvironmentName = 'NSZFH'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 584, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'TOVÁBBI iskolatitkár, kollégiumi titkár (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'TOVÁBBI iskolatitkár, kollégiumi titkár (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'TOVÁBBI iskolatitkár, kollégiumi titkár (*)' 
    ,DIB.C_TYPE = N'MunkakorTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 584;
  END IF @TEMP_EnvironmentName = 'HOI'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 584, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'NOKS iskolatitkár (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'NOKS iskolatitkár (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'NOKS iskolatitkár (*)' 
    ,DIB.C_TYPE = N'MunkakorTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 584;
  END IF @TEMP_EnvironmentName = 'AZURE'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 584, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'NOKS iskolatitkár (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'NOKS iskolatitkár (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'NOKS iskolatitkár (*)' 
    ,DIB.C_TYPE = N'MunkakorTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 584;
  END IF @TEMP_EnvironmentName = 'KK'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 3026, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'NOKS könyvtáros (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'NOKS könyvtáros (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'NOKS könyvtáros (*)' 
    ,DIB.C_TYPE = N'MunkakorTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 3026;
  END IF @TEMP_EnvironmentName = 'NSZFH'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 3026, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'TOVÁBBI könyvtáros (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'TOVÁBBI könyvtáros (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'TOVÁBBI könyvtáros (*)' 
    ,DIB.C_TYPE = N'MunkakorTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 3026;
  END IF @TEMP_EnvironmentName = 'HOI'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 3026, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'NOKS könyvtáros (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'NOKS könyvtáros (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'NOKS könyvtáros (*)' 
    ,DIB.C_TYPE = N'MunkakorTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 3026;
  END IF @TEMP_EnvironmentName = 'AZURE'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 3026, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'NOKS könyvtáros (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'NOKS könyvtáros (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'NOKS könyvtáros (*)' 
    ,DIB.C_TYPE = N'MunkakorTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 3026;
  END IF @TEMP_EnvironmentName = 'KK'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 589, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'NOKS laboráns (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'NOKS laboráns (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'NOKS laboráns (*)' 
    ,DIB.C_TYPE = N'MunkakorTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 589;
  END IF @TEMP_EnvironmentName = 'NSZFH'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 589, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'TOVÁBBI laboráns (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'TOVÁBBI laboráns (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'TOVÁBBI laboráns (*)' 
    ,DIB.C_TYPE = N'MunkakorTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 589;
  END IF @TEMP_EnvironmentName = 'HOI'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 589, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'NOKS laboráns (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'NOKS laboráns (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'NOKS laboráns (*)' 
    ,DIB.C_TYPE = N'MunkakorTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 589;
  END IF @TEMP_EnvironmentName = 'AZURE'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 589, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'NOKS laboráns (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'NOKS laboráns (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'NOKS laboráns (*)' 
    ,DIB.C_TYPE = N'MunkakorTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 589;
  END IF @TEMP_EnvironmentName = 'KK'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 565, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'NOKS műszaki vezető (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'NOKS műszaki vezető (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'NOKS műszaki vezető (*)' 
    ,DIB.C_TYPE = N'MunkakorTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 565;
  END IF @TEMP_EnvironmentName = 'NSZFH'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 565, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'TOVÁBBI műszaki vezető (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'TOVÁBBI műszaki vezető (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'TOVÁBBI műszaki vezető (*)' 
    ,DIB.C_TYPE = N'MunkakorTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 565;
  END IF @TEMP_EnvironmentName = 'HOI'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 565, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'NOKS műszaki vezető (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'NOKS műszaki vezető (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'NOKS műszaki vezető (*)' 
    ,DIB.C_TYPE = N'MunkakorTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 565;
  END IF @TEMP_EnvironmentName = 'AZURE'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 565, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'NOKS műszaki vezető (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'NOKS műszaki vezető (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'NOKS műszaki vezető (*)' 
    ,DIB.C_TYPE = N'MunkakorTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 565;
  END IF @TEMP_EnvironmentName = 'KK'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 585, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'NOKS pedagógiai asszisztens (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'NOKS pedagógiai asszisztens (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'NOKS pedagógiai asszisztens (*)' 
    ,DIB.C_TYPE = N'MunkakorTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 585;
  END IF @TEMP_EnvironmentName = 'NSZFH'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 585, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'TOVÁBBI pedagógiai asszisztens (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'TOVÁBBI pedagógiai asszisztens (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'TOVÁBBI pedagógiai asszisztens (*)' 
    ,DIB.C_TYPE = N'MunkakorTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 585;
  END IF @TEMP_EnvironmentName = 'HOI'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 585, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'NOKS pedagógiai asszisztens (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'NOKS pedagógiai asszisztens (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'NOKS pedagógiai asszisztens (*)' 
    ,DIB.C_TYPE = N'MunkakorTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 585;
  END IF @TEMP_EnvironmentName = 'AZURE'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 585, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'NOKS pedagógiai asszisztens (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'NOKS pedagógiai asszisztens (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'NOKS pedagógiai asszisztens (*)' 
    ,DIB.C_TYPE = N'MunkakorTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 585;
  END IF @TEMP_EnvironmentName = 'KK'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 6421, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'NOKS pszichopedagógus (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'NOKS pszichopedagógus (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'NOKS pszichopedagógus (*)' 
    ,DIB.C_TYPE = N'MunkakorTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 6421;
  END IF @TEMP_EnvironmentName = 'NSZFH'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 6421, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'TOVÁBBI pszichopedagógus (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'TOVÁBBI pszichopedagógus (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'TOVÁBBI pszichopedagógus (*)' 
    ,DIB.C_TYPE = N'MunkakorTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 6421;
  END IF @TEMP_EnvironmentName = 'HOI'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 6421, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'NOKS pszichopedagógus (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'NOKS pszichopedagógus (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'NOKS pszichopedagógus (*)' 
    ,DIB.C_TYPE = N'MunkakorTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 6421;
  END IF @TEMP_EnvironmentName = 'AZURE'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 6421, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'NOKS pszichopedagógus (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'NOKS pszichopedagógus (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'NOKS pszichopedagógus (*)' 
    ,DIB.C_TYPE = N'MunkakorTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 6421;
  END IF @TEMP_EnvironmentName = 'KK'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 594, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'NOKS rendszergazda (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'NOKS rendszergazda (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'NOKS rendszergazda (*)' 
    ,DIB.C_TYPE = N'MunkakorTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 594;
  END IF @TEMP_EnvironmentName = 'NSZFH'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 594, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'TOVÁBBI rendszergazda (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'TOVÁBBI rendszergazda (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'TOVÁBBI rendszergazda (*)' 
    ,DIB.C_TYPE = N'MunkakorTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 594;
  END IF @TEMP_EnvironmentName = 'HOI'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 594, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'NOKS rendszergazda (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'NOKS rendszergazda (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'NOKS rendszergazda (*)' 
    ,DIB.C_TYPE = N'MunkakorTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 594;
  END IF @TEMP_EnvironmentName = 'AZURE'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 594, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'NOKS rendszergazda (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'NOKS rendszergazda (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'NOKS rendszergazda (*)' 
    ,DIB.C_TYPE = N'MunkakorTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 594;
  END IF @TEMP_EnvironmentName = 'KK'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 564, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'NOKS szabadidő-szervező (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'NOKS szabadidő-szervező (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'NOKS szabadidő-szervező (*)' 
    ,DIB.C_TYPE = N'MunkakorTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 564;
  END IF @TEMP_EnvironmentName = 'NSZFH'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 564, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'TOVÁBBI szabadidő-szervező (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'TOVÁBBI szabadidő-szervező (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'TOVÁBBI szabadidő-szervező (*)' 
    ,DIB.C_TYPE = N'MunkakorTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 564;
  END IF @TEMP_EnvironmentName = 'HOI'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 564, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'NOKS szabadidő-szervező (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'NOKS szabadidő-szervező (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'NOKS szabadidő-szervező (*)' 
    ,DIB.C_TYPE = N'MunkakorTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 564;
  END IF @TEMP_EnvironmentName = 'AZURE'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 564, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'NOKS szabadidő-szervező (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'NOKS szabadidő-szervező (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'NOKS szabadidő-szervező (*)' 
    ,DIB.C_TYPE = N'MunkakorTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 564;
  END IF @TEMP_EnvironmentName = 'KK'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 579, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'szociális munkás' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'szociális munkás' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'szociális munkás' 
    ,DIB.C_TYPE = N'MunkakorTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 579;
  END IF @TEMP_EnvironmentName = 'NSZFH'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 579, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'TOVÁBBI szociális munkás (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'TOVÁBBI szociális munkás (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'TOVÁBBI szociális munkás (*)' 
    ,DIB.C_TYPE = N'MunkakorTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 579;
  END IF @TEMP_EnvironmentName = 'HOI'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 579, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'szociális munkás' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'szociális munkás' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'szociális munkás' 
    ,DIB.C_TYPE = N'MunkakorTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 579;
  END IF @TEMP_EnvironmentName = 'AZURE'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 579, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'szociális munkás' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'szociális munkás' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'szociális munkás' 
    ,DIB.C_TYPE = N'MunkakorTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 579;
  END IF @TEMP_EnvironmentName = 'KK'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 568, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'NOKS úszómester (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'NOKS úszómester (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'NOKS úszómester (*)' 
    ,DIB.C_TYPE = N'MunkakorTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 568;
  END IF @TEMP_EnvironmentName = 'NSZFH'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 568, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'TOVÁBBI úszómester (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'TOVÁBBI úszómester (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'TOVÁBBI úszómester (*)' 
    ,DIB.C_TYPE = N'MunkakorTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 568;
  END IF @TEMP_EnvironmentName = 'HOI'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 568, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'NOKS úszómester (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'NOKS úszómester (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'NOKS úszómester (*)' 
    ,DIB.C_TYPE = N'MunkakorTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 568;
  END IF @TEMP_EnvironmentName = 'AZURE'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 568, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'NOKS úszómester (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'NOKS úszómester (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'NOKS úszómester (*)' 
    ,DIB.C_TYPE = N'MunkakorTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 568;
  END IF @TEMP_EnvironmentName = 'KK'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 569, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'EGYÉB gazdasági dolgozó (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'EGYÉB gazdasági dolgozó (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'EGYÉB gazdasági dolgozó (*)' 
    ,DIB.C_TYPE = N'MunkakorTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 569;
  END IF @TEMP_EnvironmentName = 'NSZFH'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 569, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'TOVÁBBI gazdasági dolgozó (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'TOVÁBBI gazdasági dolgozó (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'TOVÁBBI gazdasági dolgozó (*)' 
    ,DIB.C_TYPE = N'MunkakorTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 569;
  END IF @TEMP_EnvironmentName = 'HOI'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 569, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'EGYÉB gazdasági dolgozó (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'EGYÉB gazdasági dolgozó (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'EGYÉB gazdasági dolgozó (*)' 
    ,DIB.C_TYPE = N'MunkakorTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 569;
  END IF @TEMP_EnvironmentName = 'AZURE'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 569, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'EGYÉB gazdasági dolgozó (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'EGYÉB gazdasági dolgozó (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'EGYÉB gazdasági dolgozó (*)' 
    ,DIB.C_TYPE = N'MunkakorTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 569;
  END IF @TEMP_EnvironmentName = 'KK'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 572, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'EGYÉB kisegítő dolgozó (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'EGYÉB kisegítő dolgozó (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'EGYÉB kisegítő dolgozó (*)' 
    ,DIB.C_TYPE = N'MunkakorTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 572;
  END IF @TEMP_EnvironmentName = 'NSZFH'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 572, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'TOVÁBBI kisegítő dolgozó (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'TOVÁBBI kisegítő dolgozó (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'TOVÁBBI kisegítő dolgozó (*)' 
    ,DIB.C_TYPE = N'MunkakorTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 572;
  END IF @TEMP_EnvironmentName = 'HOI'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 572, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'EGYÉB kisegítő dolgozó (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'EGYÉB kisegítő dolgozó (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'EGYÉB kisegítő dolgozó (*)' 
    ,DIB.C_TYPE = N'MunkakorTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 572;
  END IF @TEMP_EnvironmentName = 'AZURE'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 572, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'EGYÉB kisegítő dolgozó (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'EGYÉB kisegítő dolgozó (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'EGYÉB kisegítő dolgozó (*)' 
    ,DIB.C_TYPE = N'MunkakorTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 572;
  END IF @TEMP_EnvironmentName = 'KK'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 6404, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'EGYÉB munkaügyi, személyzeti előadó (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'EGYÉB munkaügyi, személyzeti előadó (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'EGYÉB munkaügyi, személyzeti előadó (*)' 
    ,DIB.C_TYPE = N'MunkakorTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 6404;
  END IF @TEMP_EnvironmentName = 'NSZFH'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 6404, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'TOVÁBBI munkaügyi, személyzeti előadó (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'TOVÁBBI munkaügyi, személyzeti előadó (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'TOVÁBBI munkaügyi, személyzeti előadó (*)' 
    ,DIB.C_TYPE = N'MunkakorTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 6404;
  END IF @TEMP_EnvironmentName = 'HOI'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 6404, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'EGYÉB munkaügyi, személyzeti előadó (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'EGYÉB munkaügyi, személyzeti előadó (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'EGYÉB munkaügyi, személyzeti előadó (*)' 
    ,DIB.C_TYPE = N'MunkakorTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 6404;
  END IF @TEMP_EnvironmentName = 'AZURE'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 6404, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'EGYÉB munkaügyi, személyzeti előadó (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'EGYÉB munkaügyi, személyzeti előadó (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'EGYÉB munkaügyi, személyzeti előadó (*)' 
    ,DIB.C_TYPE = N'MunkakorTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 6404;
  END IF @TEMP_EnvironmentName = 'KK'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 571, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'EGYÉB műszaki dolgozó (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'EGYÉB műszaki dolgozó (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'EGYÉB műszaki dolgozó (*)' 
    ,DIB.C_TYPE = N'MunkakorTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 571;
  END IF @TEMP_EnvironmentName = 'NSZFH'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 571, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'TOVÁBBI műszaki dolgozó (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'TOVÁBBI műszaki dolgozó (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'TOVÁBBI műszaki dolgozó (*)' 
    ,DIB.C_TYPE = N'MunkakorTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 571;
  END IF @TEMP_EnvironmentName = 'HOI'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 571, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'EGYÉB műszaki dolgozó (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'EGYÉB műszaki dolgozó (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'EGYÉB műszaki dolgozó (*)' 
    ,DIB.C_TYPE = N'MunkakorTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 571;
  END IF @TEMP_EnvironmentName = 'AZURE'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 571, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'EGYÉB műszaki dolgozó (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'EGYÉB műszaki dolgozó (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'EGYÉB műszaki dolgozó (*)' 
    ,DIB.C_TYPE = N'MunkakorTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 571;
  END IF @TEMP_EnvironmentName = 'KK'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 586, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'EGYÉB oktatástechnikus (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'EGYÉB oktatástechnikus (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'EGYÉB oktatástechnikus (*)' 
    ,DIB.C_TYPE = N'MunkakorTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 586;
  END IF @TEMP_EnvironmentName = 'NSZFH'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 586, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'TOVÁBBI oktatástechnikus (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'TOVÁBBI oktatástechnikus (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'TOVÁBBI oktatástechnikus (*)' 
    ,DIB.C_TYPE = N'MunkakorTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 586;
  END IF @TEMP_EnvironmentName = 'HOI'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 586, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'EGYÉB oktatástechnikus (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'EGYÉB oktatástechnikus (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'EGYÉB oktatástechnikus (*)' 
    ,DIB.C_TYPE = N'MunkakorTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 586;
  END IF @TEMP_EnvironmentName = 'AZURE'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 586, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'EGYÉB oktatástechnikus (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'EGYÉB oktatástechnikus (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'EGYÉB oktatástechnikus (*)' 
    ,DIB.C_TYPE = N'MunkakorTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 586;
  END IF @TEMP_EnvironmentName = 'KK'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 570, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'EGYÉB ügyviteli dolgozó (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'EGYÉB ügyviteli dolgozó (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'EGYÉB ügyviteli dolgozó (*)' 
    ,DIB.C_TYPE = N'MunkakorTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 570;
  END IF @TEMP_EnvironmentName = 'NSZFH'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 570, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'TOVÁBBI ügyviteli dolgozó (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'TOVÁBBI ügyviteli dolgozó (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'TOVÁBBI ügyviteli dolgozó (*)' 
    ,DIB.C_TYPE = N'MunkakorTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 570;
  END IF @TEMP_EnvironmentName = 'HOI'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 570, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'EGYÉB ügyviteli dolgozó (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'EGYÉB ügyviteli dolgozó (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'EGYÉB ügyviteli dolgozó (*)' 
    ,DIB.C_TYPE = N'MunkakorTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 570;
  END IF @TEMP_EnvironmentName = 'AZURE'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 570, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'EGYÉB ügyviteli dolgozó (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'EGYÉB ügyviteli dolgozó (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'EGYÉB ügyviteli dolgozó (*)' 
    ,DIB.C_TYPE = N'MunkakorTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 570;
  END IF @TEMP_EnvironmentName = 'KK'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 6709, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'külső gyakorlati képzőhely (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'külső gyakorlati képzőhely (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'külső gyakorlati képzőhely (*)' 
    ,DIB.C_TYPE = N'MunkakorTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 6709;
  END IF @TEMP_EnvironmentName = 'NSZFH'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 6709, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'duális képzőhely (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'duális képzőhely (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'duális képzőhely (*)' 
    ,DIB.C_TYPE = N'MunkakorTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 6709;
  END IF @TEMP_EnvironmentName = 'HOI'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 6709, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'külső gyakorlati képzőhely (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'külső gyakorlati képzőhely (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'külső gyakorlati képzőhely (*)' 
    ,DIB.C_TYPE = N'MunkakorTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 6709;
  END IF @TEMP_EnvironmentName = 'AZURE'
  BEGIN 
  INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE) 
  SELECT DIB.ID, 6709, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021'
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'külső gyakorlati képzőhely (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET 
    DIB.TOROLT = 'T' 
  FROM T_DICTIONARYITEMBASE DIB INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.C_TYPE = N'MunkakorTipus' AND DIB.C_NAME = N'külső gyakorlati képzőhely (*)' AND DIB.TOROLT = 'F' 
  UPDATE DIB SET DIB.TOROLT = 'F'     ,DIB.C_NAME = N'külső gyakorlati képzőhely (*)' 
    ,DIB.C_TYPE = N'MunkakorTipus' 
    ,DIB.C_VISIBLE = N'T' 
  FROM T_DICTIONARYITEMBASE DIB 
  INNER JOIN T_TANEV t ON t.ID = DIB.C_TANEVID AND t.TOROLT = 'F' AND t.C_NEV = '2020/2021' 
    WHERE DIB.ID = 6709;
  END
 EXEC [dev].[uspCreateDictionaryItems] NULL, NULL 
 EXEC [dev].uspSwitchDictionaryItemBaseFromTmp  