﻿
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), @LastTanevSorszam int 
SET @LastTanevSorszam  = (SELECT MAX(C_SORSZAM) FROM T_TANEV WHERE TOROLT = 'F' AND (C_KOVETKEZO = 'T' OR C_AKTIV = 'T'))
SET @TEMP_EnvironmentName = (SELECT [Value] 
FROM dev.EnvironmentInfo WHERE [Key] = 'Dictionary')
IF (@TEMP_EnvironmentName IS NULL OR @TEMP_EnvironmentName NOT IN ('KK','NSZFH','HOI','AZURE'))
BEGIN  INSERT INTO T_DICTIONARYITEMBASE(C_VALUE) VALUES('Nincs Dictionary ertek a dev.EnvironmentInfo tablaban') END  -- elszall a migracio ha nincs 

IF @TEMP_EnvironmentName = 'KK'
  BEGIN 
    -----  8704 ----- Na -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8704, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 171 AND DIB.C_NAME = N'Na' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 171 AND DIB.C_NAME = N'Na' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'NSZFH'
  BEGIN 
    -----  8704 ----- Na -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8704, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 171 AND DIB.C_NAME = N'Na' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 171 AND DIB.C_NAME = N'Na' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'HOI'
  BEGIN 
    -----  8704 ----- Na -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8704, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 171 AND DIB.C_NAME = N'Na' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 171 AND DIB.C_NAME = N'Na' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'AZURE'
  BEGIN 
    -----  8704 ----- Na -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8704, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 171 AND DIB.C_NAME = N'Na' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 171 AND DIB.C_NAME = N'Na' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'KK'
  BEGIN 
    -----  8705 ----- Több műfaj -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8705, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 171 AND DIB.C_NAME = N'Több műfaj' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 171 AND DIB.C_NAME = N'Több műfaj' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'NSZFH'
  BEGIN 
    -----  8705 ----- Több műfaj -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8705, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 171 AND DIB.C_NAME = N'Több műfaj' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 171 AND DIB.C_NAME = N'Több műfaj' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'HOI'
  BEGIN 
    -----  8705 ----- Több műfaj -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8705, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 171 AND DIB.C_NAME = N'Több műfaj' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 171 AND DIB.C_NAME = N'Több műfaj' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'AZURE'
  BEGIN 
    -----  8705 ----- Több műfaj -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8705, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 171 AND DIB.C_NAME = N'Több műfaj' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 171 AND DIB.C_NAME = N'Több műfaj' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'KK'
  BEGIN 
    -----  8706 ----- Akkordikus -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8706, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Akkordikus' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Akkordikus' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'NSZFH'
  BEGIN 
    -----  8706 ----- Akkordikus -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8706, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Akkordikus' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Akkordikus' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'HOI'
  BEGIN 
    -----  8706 ----- Akkordikus -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8706, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Akkordikus' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Akkordikus' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'AZURE'
  BEGIN 
    -----  8706 ----- Akkordikus -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8706, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Akkordikus' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Akkordikus' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'KK'
  BEGIN 
    -----  8707 ----- Billentyűs -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8707, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Billentyűs' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Billentyűs' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'NSZFH'
  BEGIN 
    -----  8707 ----- Billentyűs -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8707, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Billentyűs' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Billentyűs' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'HOI'
  BEGIN 
    -----  8707 ----- Billentyűs -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8707, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Billentyűs' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Billentyűs' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'AZURE'
  BEGIN 
    -----  8707 ----- Billentyűs -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8707, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Billentyűs' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Billentyűs' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'KK'
  BEGIN 
    -----  8708 ----- Fafúvós -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8708, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Fafúvós' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Fafúvós' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'NSZFH'
  BEGIN 
    -----  8708 ----- Fafúvós -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8708, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Fafúvós' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Fafúvós' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'HOI'
  BEGIN 
    -----  8708 ----- Fafúvós -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8708, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Fafúvós' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Fafúvós' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'AZURE'
  BEGIN 
    -----  8708 ----- Fafúvós -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8708, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Fafúvós' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Fafúvós' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'KK'
  BEGIN 
    -----  8709 ----- Fúvós -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8709, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Fúvós' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Fúvós' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'NSZFH'
  BEGIN 
    -----  8709 ----- Fúvós -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8709, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Fúvós' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Fúvós' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'HOI'
  BEGIN 
    -----  8709 ----- Fúvós -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8709, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Fúvós' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Fúvós' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'AZURE'
  BEGIN 
    -----  8709 ----- Fúvós -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8709, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Fúvós' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Fúvós' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'KK'
  BEGIN 
    -----  8710 ----- Kamarazene -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8710, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Kamarazene' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Kamarazene' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'NSZFH'
  BEGIN 
    -----  8710 ----- Kamarazene -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8710, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Kamarazene' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Kamarazene' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'HOI'
  BEGIN 
    -----  8710 ----- Kamarazene -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8710, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Kamarazene' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Kamarazene' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'AZURE'
  BEGIN 
    -----  8710 ----- Kamarazene -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8710, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Kamarazene' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Kamarazene' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'KK'
  BEGIN 
    -----  8711 ----- Pengetős -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8711, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Pengetős' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Pengetős' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'NSZFH'
  BEGIN 
    -----  8711 ----- Pengetős -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8711, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Pengetős' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Pengetős' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'HOI'
  BEGIN 
    -----  8711 ----- Pengetős -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8711, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Pengetős' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Pengetős' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'AZURE'
  BEGIN 
    -----  8711 ----- Pengetős -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8711, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Pengetős' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Pengetős' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'KK'
  BEGIN 
    -----  8712 ----- Rézfúvós -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8712, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Rézfúvós' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Rézfúvós' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'NSZFH'
  BEGIN 
    -----  8712 ----- Rézfúvós -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8712, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Rézfúvós' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Rézfúvós' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'HOI'
  BEGIN 
    -----  8712 ----- Rézfúvós -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8712, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Rézfúvós' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Rézfúvós' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'AZURE'
  BEGIN 
    -----  8712 ----- Rézfúvós -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8712, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Rézfúvós' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Rézfúvós' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'KK'
  BEGIN 
    -----  8713 ----- Ütős -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8713, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Ütős' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Ütős' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'NSZFH'
  BEGIN 
    -----  8713 ----- Ütős -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8713, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Ütős' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Ütős' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'HOI'
  BEGIN 
    -----  8713 ----- Ütős -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8713, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Ütős' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Ütős' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'AZURE'
  BEGIN 
    -----  8713 ----- Ütős -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8713, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Ütős' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Ütős' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'KK'
  BEGIN 
    -----  8714 ----- Vokális -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8714, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Vokális' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Vokális' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'NSZFH'
  BEGIN 
    -----  8714 ----- Vokális -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8714, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Vokális' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Vokális' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'HOI'
  BEGIN 
    -----  8714 ----- Vokális -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8714, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Vokális' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Vokális' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'AZURE'
  BEGIN 
    -----  8714 ----- Vokális -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8714, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Vokális' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Vokális' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'KK'
  BEGIN 
    -----  8715 ----- Vonós és tekerő -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8715, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Vonós és tekerő' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Vonós és tekerő' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'NSZFH'
  BEGIN 
    -----  8715 ----- Vonós és tekerő -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8715, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Vonós és tekerő' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Vonós és tekerő' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'HOI'
  BEGIN 
    -----  8715 ----- Vonós és tekerő -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8715, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Vonós és tekerő' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Vonós és tekerő' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'AZURE'
  BEGIN 
    -----  8715 ----- Vonós és tekerő -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8715, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Vonós és tekerő' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Vonós és tekerő' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'KK'
  BEGIN 
    -----  8716 ----- Vonós -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8716, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Vonós' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Vonós' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'NSZFH'
  BEGIN 
    -----  8716 ----- Vonós -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8716, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Vonós' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Vonós' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'HOI'
  BEGIN 
    -----  8716 ----- Vonós -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8716, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Vonós' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Vonós' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'AZURE'
  BEGIN 
    -----  8716 ----- Vonós -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8716, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Vonós' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Vonós' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'KK'
  BEGIN 
    -----  8717 ----- Zeneismeret -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8717, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Zeneismeret' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Zeneismeret' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'NSZFH'
  BEGIN 
    -----  8717 ----- Zeneismeret -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8717, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Zeneismeret' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Zeneismeret' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'HOI'
  BEGIN 
    -----  8717 ----- Zeneismeret -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8717, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Zeneismeret' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Zeneismeret' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'AZURE'
  BEGIN 
    -----  8717 ----- Zeneismeret -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8717, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Zeneismeret' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Zeneismeret' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'KK'
  BEGIN 
    -----  8718 ----- Balett -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8718, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Balett' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Balett' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'NSZFH'
  BEGIN 
    -----  8718 ----- Balett -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8718, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Balett' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Balett' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'HOI'
  BEGIN 
    -----  8718 ----- Balett -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8718, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Balett' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Balett' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'AZURE'
  BEGIN 
    -----  8718 ----- Balett -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8718, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Balett' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Balett' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'KK'
  BEGIN 
    -----  8719 ----- Kortárstánc -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8719, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Kortárstánc' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Kortárstánc' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'NSZFH'
  BEGIN 
    -----  8719 ----- Kortárstánc -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8719, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Kortárstánc' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Kortárstánc' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'HOI'
  BEGIN 
    -----  8719 ----- Kortárstánc -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8719, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Kortárstánc' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Kortárstánc' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'AZURE'
  BEGIN 
    -----  8719 ----- Kortárstánc -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8719, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Kortárstánc' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Kortárstánc' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'KK'
  BEGIN 
    -----  8720 ----- Moderntánc -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8720, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Moderntánc' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Moderntánc' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'NSZFH'
  BEGIN 
    -----  8720 ----- Moderntánc -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8720, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Moderntánc' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Moderntánc' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'HOI'
  BEGIN 
    -----  8720 ----- Moderntánc -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8720, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Moderntánc' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Moderntánc' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'AZURE'
  BEGIN 
    -----  8720 ----- Moderntánc -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8720, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Moderntánc' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Moderntánc' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'KK'
  BEGIN 
    -----  8721 ----- Néptánc -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8721, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Néptánc' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Néptánc' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'NSZFH'
  BEGIN 
    -----  8721 ----- Néptánc -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8721, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Néptánc' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Néptánc' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'HOI'
  BEGIN 
    -----  8721 ----- Néptánc -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8721, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Néptánc' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Néptánc' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'AZURE'
  BEGIN 
    -----  8721 ----- Néptánc -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8721, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Néptánc' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Néptánc' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'KK'
  BEGIN 
    -----  8722 ----- Társastánc -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8722, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Társastánc' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Társastánc' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'NSZFH'
  BEGIN 
    -----  8722 ----- Társastánc -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8722, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Társastánc' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Társastánc' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'HOI'
  BEGIN 
    -----  8722 ----- Társastánc -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8722, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Társastánc' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Társastánc' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'AZURE'
  BEGIN 
    -----  8722 ----- Társastánc -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8722, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Társastánc' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Társastánc' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'KK'
  BEGIN 
    -----  8723 ----- Fém- és zománcműves -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8723, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Fém- és zománcműves' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Fém- és zománcműves' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'NSZFH'
  BEGIN 
    -----  8723 ----- Fém- és zománcműves -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8723, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Fém- és zománcműves' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Fém- és zománcműves' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'HOI'
  BEGIN 
    -----  8723 ----- Fém- és zománcműves -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8723, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Fém- és zománcműves' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Fém- és zománcműves' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'AZURE'
  BEGIN 
    -----  8723 ----- Fém- és zománcműves -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8723, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Fém- és zománcműves' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Fém- és zománcműves' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'KK'
  BEGIN 
    -----  8724 ----- Fotó és film -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8724, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Fotó és film' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Fotó és film' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'NSZFH'
  BEGIN 
    -----  8724 ----- Fotó és film -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8724, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Fotó és film' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Fotó és film' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'HOI'
  BEGIN 
    -----  8724 ----- Fotó és film -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8724, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Fotó és film' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Fotó és film' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'AZURE'
  BEGIN 
    -----  8724 ----- Fotó és film -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8724, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Fotó és film' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Fotó és film' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'KK'
  BEGIN 
    -----  8725 ----- Grafika és festészet -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8725, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Grafika és festészet' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Grafika és festészet' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'NSZFH'
  BEGIN 
    -----  8725 ----- Grafika és festészet -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8725, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Grafika és festészet' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Grafika és festészet' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'HOI'
  BEGIN 
    -----  8725 ----- Grafika és festészet -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8725, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Grafika és festészet' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Grafika és festészet' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'AZURE'
  BEGIN 
    -----  8725 ----- Grafika és festészet -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8725, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Grafika és festészet' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Grafika és festészet' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'KK'
  BEGIN 
    -----  8726 ----- Képzőművészeti -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8726, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Képzőművészeti' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Képzőművészeti' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'NSZFH'
  BEGIN 
    -----  8726 ----- Képzőművészeti -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8726, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Képzőművészeti' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Képzőművészeti' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'HOI'
  BEGIN 
    -----  8726 ----- Képzőművészeti -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8726, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Képzőművészeti' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Képzőművészeti' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'AZURE'
  BEGIN 
    -----  8726 ----- Képzőművészeti -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8726, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Képzőművészeti' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Képzőművészeti' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'KK'
  BEGIN 
    -----  8727 ----- Környezet- és kézműveskultúra -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8727, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Környezet- és kézműveskultúra' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Környezet- és kézműveskultúra' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'NSZFH'
  BEGIN 
    -----  8727 ----- Környezet- és kézműveskultúra -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8727, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Környezet- és kézműveskultúra' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Környezet- és kézműveskultúra' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'HOI'
  BEGIN 
    -----  8727 ----- Környezet- és kézműveskultúra -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8727, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Környezet- és kézműveskultúra' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Környezet- és kézműveskultúra' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'AZURE'
  BEGIN 
    -----  8727 ----- Környezet- és kézműveskultúra -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8727, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Környezet- és kézműveskultúra' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Környezet- és kézműveskultúra' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'KK'
  BEGIN 
    -----  8728 ----- Szobrászat és kerámia -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8728, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Szobrászat és kerámia' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Szobrászat és kerámia' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'NSZFH'
  BEGIN 
    -----  8728 ----- Szobrászat és kerámia -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8728, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Szobrászat és kerámia' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Szobrászat és kerámia' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'HOI'
  BEGIN 
    -----  8728 ----- Szobrászat és kerámia -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8728, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Szobrászat és kerámia' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Szobrászat és kerámia' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'AZURE'
  BEGIN 
    -----  8728 ----- Szobrászat és kerámia -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8728, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Szobrászat és kerámia' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Szobrászat és kerámia' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'KK'
  BEGIN 
    -----  8729 ----- Textil- és bőrműves -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8729, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Textil- és bőrműves' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Textil- és bőrműves' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'NSZFH'
  BEGIN 
    -----  8729 ----- Textil- és bőrműves -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8729, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Textil- és bőrműves' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Textil- és bőrműves' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'HOI'
  BEGIN 
    -----  8729 ----- Textil- és bőrműves -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8729, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Textil- és bőrműves' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Textil- és bőrműves' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'AZURE'
  BEGIN 
    -----  8729 ----- Textil- és bőrműves -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8729, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Textil- és bőrműves' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Textil- és bőrműves' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'KK'
  BEGIN 
    -----  8730 ----- Színjáték -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8730, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Színjáték' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Színjáték' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'NSZFH'
  BEGIN 
    -----  8730 ----- Színjáték -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8730, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Színjáték' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Színjáték' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'HOI'
  BEGIN 
    -----  8730 ----- Színjáték -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8730, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Színjáték' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Színjáték' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'AZURE'
  BEGIN 
    -----  8730 ----- Színjáték -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8730, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Színjáték' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Színjáték' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'KK'
  BEGIN 
    -----  8731 ----- Bábjáték -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8731, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Bábjáték' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Bábjáték' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'NSZFH'
  BEGIN 
    -----  8731 ----- Bábjáték -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8731, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Bábjáték' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Bábjáték' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'HOI'
  BEGIN 
    -----  8731 ----- Bábjáték -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8731, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Bábjáték' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Bábjáték' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'AZURE'
  BEGIN 
    -----  8731 ----- Bábjáték -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8731, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Bábjáték' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Bábjáték' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'KK'
  BEGIN 
    -----  8732 ----- Több tanszak -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8732, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Több tanszak' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Több tanszak' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'NSZFH'
  BEGIN 
    -----  8732 ----- Több tanszak -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8732, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Több tanszak' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Több tanszak' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'HOI'
  BEGIN 
    -----  8732 ----- Több tanszak -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8732, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Több tanszak' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Több tanszak' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'AZURE'
  BEGIN 
    -----  8732 ----- Több tanszak -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8732, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Több tanszak' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 172 AND DIB.C_NAME = N'Több tanszak' AND DIB.TOROLT = 'F' 
END 
;
 DISABLE TRIGGER ALL ON T_DICTIONARYITEMBASE;  
 EXEC [dev].[uspCreateDictionaryItems] NULL, NULL; 
 ENABLE TRIGGER ALL ON T_DICTIONARYITEMBASE;  
 EXEC [dev].uspSwitchDictionaryItemBaseFromTmp;  