﻿
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 [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 
    -----  8683 ----- Sutori -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8683, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 166 AND DIB.C_NAME = N'Sutori' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 166 AND DIB.C_NAME = N'Sutori' AND DIB.TOROLT = 'F' 
END 

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

IF @TEMP_EnvironmentName = 'KK'
  BEGIN 
    -----  8696 ----- Új Szkt. - Ágazat -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8696, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 130 AND DIB.C_NAME = N'Új Szkt. - Ágazat' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 130 AND DIB.C_NAME = N'Új Szkt. - Ágazat' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'NSZFH'
  BEGIN 
    -----  8696 ----- Új Szkt. - Ágazat -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8696, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 130 AND DIB.C_NAME = N'Új Szkt. - Ágazat' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 130 AND DIB.C_NAME = N'Új Szkt. - Ágazat' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'HOI'
  BEGIN 
    -----  8696 ----- Új Szkt. - Ágazat -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8696, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 130 AND DIB.C_NAME = N'Új Szkt. - Ágazat' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 130 AND DIB.C_NAME = N'Új Szkt. - Ágazat' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'AZURE'
  BEGIN 
    -----  8696 ----- Új Szkt. - Ágazat -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8696, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 130 AND DIB.C_NAME = N'Új Szkt. - Ágazat' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 130 AND DIB.C_NAME = N'Új Szkt. - Ágazat' AND DIB.TOROLT = 'F' 
END 

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

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

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

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

IF @TEMP_EnvironmentName = 'KK'
  BEGIN 
    -----  8698 ----- Új Szkt. - Szakmairány -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8698, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 130 AND DIB.C_NAME = N'Új Szkt. - Szakmairány' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 130 AND DIB.C_NAME = N'Új Szkt. - Szakmairány' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'NSZFH'
  BEGIN 
    -----  8698 ----- Új Szkt. - Szakmairány -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8698, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 130 AND DIB.C_NAME = N'Új Szkt. - Szakmairány' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 130 AND DIB.C_NAME = N'Új Szkt. - Szakmairány' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'HOI'
  BEGIN 
    -----  8698 ----- Új Szkt. - Szakmairány -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8698, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 130 AND DIB.C_NAME = N'Új Szkt. - Szakmairány' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 130 AND DIB.C_NAME = N'Új Szkt. - Szakmairány' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'AZURE'
  BEGIN 
    -----  8698 ----- Új Szkt. - Szakmairány -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8698, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 130 AND DIB.C_NAME = N'Új Szkt. - Szakmairány' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 130 AND DIB.C_NAME = N'Új Szkt. - Szakmairány' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'KK'
  BEGIN 
    -----  8699 ----- Nkt. - Tanulmányi terület -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8699, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 130 AND DIB.C_NAME = N'Nkt. - Tanulmányi terület' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 130 AND DIB.C_NAME = N'Nkt. - Tanulmányi terület' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'NSZFH'
  BEGIN 
    -----  8699 ----- Nkt. - Tanulmányi terület -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8699, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 130 AND DIB.C_NAME = N'Nkt. - Tanulmányi terület' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 130 AND DIB.C_NAME = N'Nkt. - Tanulmányi terület' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'HOI'
  BEGIN 
    -----  8699 ----- Nkt. - Tanulmányi terület -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8699, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 130 AND DIB.C_NAME = N'Nkt. - Tanulmányi terület' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 130 AND DIB.C_NAME = N'Nkt. - Tanulmányi terület' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'AZURE'
  BEGIN 
    -----  8699 ----- Nkt. - Tanulmányi terület -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8699, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 130 AND DIB.C_NAME = N'Nkt. - Tanulmányi terület' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 130 AND DIB.C_NAME = N'Nkt. - Tanulmányi terület' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'KK'
  BEGIN 
    -----  8700 ----- Nkt. - Szakképesítés -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8700, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 130 AND DIB.C_NAME = N'Nkt. - Szakképesítés' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 130 AND DIB.C_NAME = N'Nkt. - Szakképesítés' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'NSZFH'
  BEGIN 
    -----  8700 ----- Nkt. - Szakképesítés -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8700, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 130 AND DIB.C_NAME = N'Nkt. - Szakképesítés' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 130 AND DIB.C_NAME = N'Nkt. - Szakképesítés' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'HOI'
  BEGIN 
    -----  8700 ----- Nkt. - Szakképesítés -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8700, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 130 AND DIB.C_NAME = N'Nkt. - Szakképesítés' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 130 AND DIB.C_NAME = N'Nkt. - Szakképesítés' AND DIB.TOROLT = 'F' 
END 

IF @TEMP_EnvironmentName = 'AZURE'
  BEGIN 
    -----  8700 ----- Nkt. - Szakképesítés -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8700, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 130 AND DIB.C_NAME = N'Nkt. - Szakképesítés' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 130 AND DIB.C_NAME = N'Nkt. - Szakképesítés' AND DIB.TOROLT = 'F' 
END 

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

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

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

IF @TEMP_EnvironmentName = 'AZURE'
  BEGIN 
    -----  8701 ----- Nkt. - Szakirány -----
    INSERT INTO tmpForSwitchDictionaryItemBase(RegiID, UjID, TanevID, C_NAME, C_TYPE)
    SELECT DIB.ID, 8701, DIB.C_TANEVID, DIB.C_NAME, DIB.C_TYPE
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 130 AND DIB.C_NAME = N'Nkt. - Szakirány' AND DIB.TOROLT = 'F' 
    UPDATE DIB SET 
    DIB.TOROLT = 'T' 
    FROM T_DICTIONARYITEMBASE DIB 
      WHERE DIB.C_DICTIONARYTYPEID = 130 AND DIB.C_NAME = N'Nkt. - Szakirány' 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;  
