
	--01. Add rows to [dbo].[CD_Communication_Type]
	DECLARE @CD_Communication_Type TABLE ([Communication_Type_Code] TINYINT NOT NULL, [Language_Code] TINYINT NOT NULL, [Communication_Type_Desc] NVARCHAR(50) NOT NULL);

	INSERT INTO @CD_Communication_Type ([Communication_Type_Code], [Language_Code], [Communication_Type_Desc]) VALUES (1, 1, N'Message')
	INSERT INTO @CD_Communication_Type ([Communication_Type_Code], [Language_Code], [Communication_Type_Desc]) VALUES (1, 2, N'Message')
	INSERT INTO @CD_Communication_Type ([Communication_Type_Code], [Language_Code], [Communication_Type_Desc]) VALUES (1, 3, N'Message')
	INSERT INTO @CD_Communication_Type ([Communication_Type_Code], [Language_Code], [Communication_Type_Desc]) VALUES (1, 4, N'Message')
	INSERT INTO @CD_Communication_Type ([Communication_Type_Code], [Language_Code], [Communication_Type_Desc]) VALUES (1, 5, N'Message')
	INSERT INTO @CD_Communication_Type ([Communication_Type_Code], [Language_Code], [Communication_Type_Desc]) VALUES (1, 6, N'Message')
	INSERT INTO @CD_Communication_Type ([Communication_Type_Code], [Language_Code], [Communication_Type_Desc]) VALUES (2, 1, N'Voice')
	INSERT INTO @CD_Communication_Type ([Communication_Type_Code], [Language_Code], [Communication_Type_Desc]) VALUES (2, 2, N'Voice')
	INSERT INTO @CD_Communication_Type ([Communication_Type_Code], [Language_Code], [Communication_Type_Desc]) VALUES (2, 3, N'Voice')
	INSERT INTO @CD_Communication_Type ([Communication_Type_Code], [Language_Code], [Communication_Type_Desc]) VALUES (2, 4, N'Voice')
	INSERT INTO @CD_Communication_Type ([Communication_Type_Code], [Language_Code], [Communication_Type_Desc]) VALUES (2, 5, N'Voice')
	INSERT INTO @CD_Communication_Type ([Communication_Type_Code], [Language_Code], [Communication_Type_Desc]) VALUES (2, 6, N'Voice')
	INSERT INTO @CD_Communication_Type ([Communication_Type_Code], [Language_Code], [Communication_Type_Desc]) VALUES (3, 1, N'Video')
	INSERT INTO @CD_Communication_Type ([Communication_Type_Code], [Language_Code], [Communication_Type_Desc]) VALUES (3, 2, N'Video')
	INSERT INTO @CD_Communication_Type ([Communication_Type_Code], [Language_Code], [Communication_Type_Desc]) VALUES (3, 3, N'Video')
	INSERT INTO @CD_Communication_Type ([Communication_Type_Code], [Language_Code], [Communication_Type_Desc]) VALUES (3, 4, N'Video')
	INSERT INTO @CD_Communication_Type ([Communication_Type_Code], [Language_Code], [Communication_Type_Desc]) VALUES (3, 5, N'Video')
	INSERT INTO @CD_Communication_Type ([Communication_Type_Code], [Language_Code], [Communication_Type_Desc]) VALUES (3, 6, N'Video')

	MERGE INTO dbo.[CD_Communication_Type] AS TARGET  
	USING @CD_Communication_Type AS SOURCE  
	ON TARGET.[Communication_Type_Code] = SOURCE.[Communication_Type_Code] and  TARGET.[Language_Code] = SOURCE.[Language_Code]
	WHEN MATCHED THEN    
	UPDATE SET [Communication_Type_Desc] = SOURCE.[Communication_Type_Desc]
	WHEN NOT MATCHED BY TARGET THEN   
	INSERT ([Communication_Type_Code], [Language_Code], [Communication_Type_Desc])   
	VALUES (SOURCE.[Communication_Type_Code], SOURCE.[Language_Code], SOURCE.[Communication_Type_Desc])  
	OUTPUT $action, SOURCE.*;


	--02. Add rows to [dbo].[CD_Panel_PSTN_Answer_Values]
	DECLARE @CD_Panel_PSTN_Answer_Values TABLE ([PSTN_ANSWER_POLICY_ID] TINYINT NOT NULL, [Language_Code] TINYINT NOT NULL, [PSTN_ANSWER_VALUE] NVARCHAR(50) NOT NULL);

	INSERT INTO @CD_Panel_PSTN_Answer_Values ([PSTN_ANSWER_POLICY_ID], [Language_Code], [PSTN_ANSWER_VALUE]) VALUES (1, 1, N'First Ring')
	INSERT INTO @CD_Panel_PSTN_Answer_Values ([PSTN_ANSWER_POLICY_ID], [Language_Code], [PSTN_ANSWER_VALUE]) VALUES (1, 2, N'First Ring')
	INSERT INTO @CD_Panel_PSTN_Answer_Values ([PSTN_ANSWER_POLICY_ID], [Language_Code], [PSTN_ANSWER_VALUE]) VALUES (1, 3, N'First Ring')
	INSERT INTO @CD_Panel_PSTN_Answer_Values ([PSTN_ANSWER_POLICY_ID], [Language_Code], [PSTN_ANSWER_VALUE]) VALUES (1, 4, N'First Ring')
	INSERT INTO @CD_Panel_PSTN_Answer_Values ([PSTN_ANSWER_POLICY_ID], [Language_Code], [PSTN_ANSWER_VALUE]) VALUES (1, 5, N'First Ring')
	INSERT INTO @CD_Panel_PSTN_Answer_Values ([PSTN_ANSWER_POLICY_ID], [Language_Code], [PSTN_ANSWER_VALUE]) VALUES (1, 6, N'First Ring')
	INSERT INTO @CD_Panel_PSTN_Answer_Values ([PSTN_ANSWER_POLICY_ID], [Language_Code], [PSTN_ANSWER_VALUE]) VALUES (2, 1, N'Double Call')
	INSERT INTO @CD_Panel_PSTN_Answer_Values ([PSTN_ANSWER_POLICY_ID], [Language_Code], [PSTN_ANSWER_VALUE]) VALUES (2, 2, N'Double Call')
	INSERT INTO @CD_Panel_PSTN_Answer_Values ([PSTN_ANSWER_POLICY_ID], [Language_Code], [PSTN_ANSWER_VALUE]) VALUES (2, 3, N'Double Call')
	INSERT INTO @CD_Panel_PSTN_Answer_Values ([PSTN_ANSWER_POLICY_ID], [Language_Code], [PSTN_ANSWER_VALUE]) VALUES (2, 4, N'Double Call')
	INSERT INTO @CD_Panel_PSTN_Answer_Values ([PSTN_ANSWER_POLICY_ID], [Language_Code], [PSTN_ANSWER_VALUE]) VALUES (2, 5, N'Double Call')
	INSERT INTO @CD_Panel_PSTN_Answer_Values ([PSTN_ANSWER_POLICY_ID], [Language_Code], [PSTN_ANSWER_VALUE]) VALUES (2, 6, N'Double Call')
	INSERT INTO @CD_Panel_PSTN_Answer_Values ([PSTN_ANSWER_POLICY_ID], [Language_Code], [PSTN_ANSWER_VALUE]) VALUES (3, 1, N'Normal Call')
	INSERT INTO @CD_Panel_PSTN_Answer_Values ([PSTN_ANSWER_POLICY_ID], [Language_Code], [PSTN_ANSWER_VALUE]) VALUES (3, 2, N'Normal Call')
	INSERT INTO @CD_Panel_PSTN_Answer_Values ([PSTN_ANSWER_POLICY_ID], [Language_Code], [PSTN_ANSWER_VALUE]) VALUES (3, 3, N'Normal Call')
	INSERT INTO @CD_Panel_PSTN_Answer_Values ([PSTN_ANSWER_POLICY_ID], [Language_Code], [PSTN_ANSWER_VALUE]) VALUES (3, 4, N'Normal Call')
	INSERT INTO @CD_Panel_PSTN_Answer_Values ([PSTN_ANSWER_POLICY_ID], [Language_Code], [PSTN_ANSWER_VALUE]) VALUES (3, 5, N'Normal Call')
	INSERT INTO @CD_Panel_PSTN_Answer_Values ([PSTN_ANSWER_POLICY_ID], [Language_Code], [PSTN_ANSWER_VALUE]) VALUES (3, 6, N'Normal Call')
	INSERT INTO @CD_Panel_PSTN_Answer_Values ([PSTN_ANSWER_POLICY_ID], [Language_Code], [PSTN_ANSWER_VALUE]) VALUES (4, 1, N'No Answer')
	INSERT INTO @CD_Panel_PSTN_Answer_Values ([PSTN_ANSWER_POLICY_ID], [Language_Code], [PSTN_ANSWER_VALUE]) VALUES (4, 2, N'No Answer')
	INSERT INTO @CD_Panel_PSTN_Answer_Values ([PSTN_ANSWER_POLICY_ID], [Language_Code], [PSTN_ANSWER_VALUE]) VALUES (4, 3, N'No Answer')
	INSERT INTO @CD_Panel_PSTN_Answer_Values ([PSTN_ANSWER_POLICY_ID], [Language_Code], [PSTN_ANSWER_VALUE]) VALUES (4, 4, N'No Answer')
	INSERT INTO @CD_Panel_PSTN_Answer_Values ([PSTN_ANSWER_POLICY_ID], [Language_Code], [PSTN_ANSWER_VALUE]) VALUES (4, 5, N'No Answer')
	INSERT INTO @CD_Panel_PSTN_Answer_Values ([PSTN_ANSWER_POLICY_ID], [Language_Code], [PSTN_ANSWER_VALUE]) VALUES (4, 6, N'No Answer')

	MERGE INTO dbo.[CD_Panel_PSTN_Answer_Values] AS TARGET  
	USING @CD_Panel_PSTN_Answer_Values AS SOURCE  
	ON TARGET.[PSTN_ANSWER_POLICY_ID] = SOURCE.[PSTN_ANSWER_POLICY_ID] and  TARGET.[Language_Code] = SOURCE.[Language_Code]
	WHEN MATCHED THEN    
	UPDATE SET [PSTN_ANSWER_VALUE] = SOURCE.[PSTN_ANSWER_VALUE]
	WHEN NOT MATCHED BY TARGET THEN   
	INSERT ([PSTN_ANSWER_POLICY_ID], [Language_Code], [PSTN_ANSWER_VALUE])   
	VALUES (SOURCE.[PSTN_ANSWER_POLICY_ID], SOURCE.[Language_Code], SOURCE.[PSTN_ANSWER_VALUE])  
	OUTPUT $action, SOURCE.*;

	--03. Add rows to @CD_Panel_Common_Label
if not exists(select 1 from [dbo].[CD_Panel_Common_Label])
BEGIN
	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (1, 1, N'BAR')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (1, 3, N'BAR')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (1, 4, N'BAR')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (1, 5, N'BAR')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (1, 8, N'Бар')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (2, 1, N'LAUNDRY')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (2, 3, N'BUANDERIE')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (2, 4, N'LAVANDERIA')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (2, 5, N'WASCHKUECHE')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (2, 8, N'Прачечная')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (3, 1, N'OFFICE')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (3, 3, N'BUREAU')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (3, 4, N'UFFICIO')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (3, 5, N'BUERO')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (3, 8, N'Офис')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (4, 1, N'MEDICAL OFFICE')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (4, 3, N'CABINET MEDICAL')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (4, 4, N'AMB. MEDICO')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (4, 5, N'ARZTPRAXIS')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (4, 8, N'Мед. учержд.')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (5, 1, N'CASH REGISTER')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (5, 3, N'CAISSE')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (5, 4, N'CASSA')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (5, 5, N'KASSE')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (5, 8, N'Касса')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (6, 1, N'CELLAR')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (6, 3, N'CAVE')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (6, 4, N'CANTINA')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (6, 5, N'KELLER')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (6, 8, N'Подвал')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (7, 1, N'WINE CELLAR')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (7, 3, N'CAVE A VIN')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (7, 4, N'CANT. PER IL VINO')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (7, 5, N'WEINKELLER')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (7, 8, N'Винный погреб')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (8, 1, N'FRIENDS ROOM')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (8, 3, N'CHAMBRE AMIS')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (8, 4, N'CAM. DEGLI OSPITI')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (8, 5, N'GAESTEZIMMER')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (8, 8, N'Гостиная')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (9, 1, N'CHILDRENS ROOM')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (9, 3, N'CHAMBRE ENFANTS')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (9, 4, N'CAM. DEI BAMBINI')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (9, 5, N'KINDERZIMMER')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (9, 8, N'Детская')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (10, 1, N'SLEEPING ROOM')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (10, 3, N'CHAMBRE A COUCH')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (10, 4, N'CAMERADA LETTO')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (10, 5, N'SCHLAFZIMMER')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (10, 8, N'Спальная')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (11, 1, N'HEATING ROOM')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (11, 3, N'CHAUFFAGE')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (11, 4, N'RISCALDAMENTO')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (11, 5, N'HEIZUNG')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (11, 8, N'Котельная')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (12, 1, N'SAFE')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (12, 3, N'COFFRE FORT')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (12, 4, N'CASSAFORTE')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (12, 5, N'TRESOR')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (12, 8, N'Сейф')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (13, 1, N'ATTIC')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (13, 3, N'COMBLES')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (13, 4, N'SOFFITA')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (13, 5, N'ESTRICH')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (13, 8, N'Мансарда')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (14, 1, N'KITCHEN')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (14, 3, N'CUISINE')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (14, 4, N'CUCINA ')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (14, 5, N'KUECHE')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (14, 8, N'Кухня')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (15, 1, N'MAIN ENTRY')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (15, 3, N'ENTREE PRINCIP.')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (15, 4, N'ENTRATA PRINCIP. ')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (15, 5, N'HAUPTEINGANG')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (15, 8, N'Главный вход')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (16, 1, N'SECOND ENTRY')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (16, 3, N'ENTREE SECOND.')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (16, 4, N'ENTRATA SECOND.  ')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (16, 5, N'NEBENEINGANG')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (16, 8, N'Запасной вход')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (17, 1, N'STAIRS')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (17, 3, N'ESCALIERS')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (17, 4, N'SCALE')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (17, 5, N'TREPPENHAUS')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (17, 8, N'Лестница')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (18, 1, N'GALLERY')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (18, 3, N'GALERIE')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (18, 4, N'GALERIA')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (18, 5, N'GALERIE')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (18, 8, N'Галерея')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (19, 1, N'GARAGE')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (19, 3, N'GARAGE')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (19, 4, N'GARAGE')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (19, 5, N'GARAGE')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (19, 8, N'Гараж')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (20, 1, N'HALL')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (20, 3, N'HALL')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (20, 4, N'CORRIDOIO')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (20, 5, N'GANG')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (20, 8, N'Холл')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (21, 1, N'WINTER GARDEN')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (21, 3, N'JARDIN HIVER')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (21, 4, N'GIARDINO D''INVE.')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (21, 5, N'WINTERGARTEN')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (21, 8, N'Зимний сад')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (22, 1, N'TECHNICAL ROOM')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (22, 3, N'LOCAL TECHNIQUE')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (22, 4, N'LOCALE TECNICO ')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (22, 5, N'TECHNIKRAUM')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (22, 8, N'Мастерская')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (23, 1, N'SHOP')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (23, 3, N'MAGASIN')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (23, 4, N'NEGOZIO')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (23, 5, N'LADEN')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (23, 8, N'Магазин')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (24, 1, N'RECEPTION')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (24, 3, N'RECEPTION')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (24, 4, N'RICEVIMENTO')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (24, 5, N'EMPFANG')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (24, 8, N'Приемная')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (25, 1, N'RESTAURANT')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (25, 3, N'RESTAURANT')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (25, 4, N'RISTORANTE')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (25, 5, N'RESTAURANT')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (25, 8, N'Ресторан')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (26, 1, N'Kitchen')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (26, 3, N'SALLE A MANGER')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (26, 4, N'SALA DA PRANZO')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (26, 5, N'ESSZIMMER')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (26, 8, N'Столовая')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (27, 1, N'WAITING ROOM')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (27, 3, N'SALLE ATTENTE')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (27, 4, N'SALA D''ATTESSA ')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (27, 5, N'WARTEZIMMER')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (27, 8, N'Приемная')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (28, 1, N'BATHROOM')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (28, 3, N'SALLE DE BAINS')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (28, 4, N'BAGNO ')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (28, 5, N'BADEZIMMER')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (28, 8, N'Ванная')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (29, 1, N'GAME ROOM')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (29, 3, N'SALLE DE JEUX')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (29, 4, N'CAMERA DA GIOCHI')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (29, 5, N'SPIELZIMMER')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (29, 8, N'Игровая')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (30, 1, N'LIVING ROOM')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (30, 3, N'SALON')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (30, 4, N'SALOTTO')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (30, 5, N'WOHNZIMMER')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (30, 8, N'Гостиная')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (31, 1, N'EMERGENCY EXIT')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (31, 3, N'SORTIE SECOURS')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (31, 4, N'USCITA DI EMERG. ')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (31, 5, N'NOTAUSGANG')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (31, 8, N'Запасной выход')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (32, 1, N'STOCK')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (32, 3, N'STOCK')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (32, 4, N'MAGAZZINO')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (32, 5, N'LAGER')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (32, 8, N'Склад')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (33, 1, N'SHOWCASE')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (33, 3, N'VITRINE')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (33, 4, N'VETRINA')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (33, 5, N'SCHAUFENSTER')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (33, 8, N'Витрина')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (34, 1, N'WC')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (34, 3, N'WC')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (34, 4, N'GABINETTO')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (34, 5, N'WC')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (34, 8, N'Туалет')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (35, 8, N'Гостиная')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (36, 8, N'Кинозал')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (37, 8, N'Переговорная')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (38, 8, N'Серверная')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (39, 8, N'Кладовая')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (40, 8, N'Служебная комната')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (41, 8, N'Задний двор')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (42, 8, N'Палисадник')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (43, 8, N'Двор')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (44, 8, N'Патио')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (45, 8, N'Прилавок')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (46, 8, N'Балкон')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (47, 8, N'Бассейн')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (48, 8, N'ТВ комната')

	INSERT [dbo].[CD_Panel_Common_Label] ([Label_Code], [Language_Code], [Text]) VALUES (49, 8, N'Спортзал')
END

	
	-- Add row to [dbo].[CD_Panel_Status]
	DECLARE @CD_Panel_Status TABLE ([Panel_Status] TINYINT NOT NULL, [Language_Code] TINYINT NOT NULL, [Code_Value] NVARCHAR(50) NULL, [Code_Description] NVARCHAR(300) NULL);

	INSERT INTO @CD_Panel_Status ([Panel_Status], [Language_Code], [Code_Value], [Code_Description]) VALUES (1, 1, NULL, NULL)
	INSERT INTO @CD_Panel_Status ([Panel_Status], [Language_Code], [Code_Value], [Code_Description]) VALUES (2, 1, NULL, NULL)

	MERGE INTO dbo.[CD_Panel_Status] AS TARGET  
	USING @CD_Panel_Status AS SOURCE  
	ON TARGET.[Panel_Status] = SOURCE.[Panel_Status] and  TARGET.[Language_Code] = SOURCE.[Language_Code]
	WHEN MATCHED THEN    
	UPDATE SET [Code_Value] = SOURCE.[Code_Value], [Code_Description] = SOURCE.[Code_Description]
	WHEN NOT MATCHED BY TARGET THEN   
	INSERT ([Panel_Status], [Language_Code], [Code_Value], [Code_Description])   
	VALUES (SOURCE.[Panel_Status], SOURCE.[Language_Code], SOURCE.[Code_Value], SOURCE.[Code_Description])  
	OUTPUT $action, SOURCE.*;

	--04. Add  rows to [dbo].[CD_Panel_Type]
	DECLARE @CD_Panel_Type TABLE ([Panel_Type_Code] SMALLINT NOT NULL, [Language_Code] TINYINT NOT NULL, [Code_Value] NVARCHAR(50) NULL, [Code_Description] NVARCHAR(300) NULL);

	INSERT @CD_Panel_Type ([Panel_Type_Code], [Language_Code], [Code_Value], [Code_Description]) VALUES (0, 1, N'WeR', N'WeR')
	INSERT @CD_Panel_Type ([Panel_Type_Code], [Language_Code], [Code_Value], [Code_Description]) VALUES (1, 1, N'Everguard', N'EG')
	INSERT @CD_Panel_Type ([Panel_Type_Code], [Language_Code], [Code_Value], [Code_Description]) VALUES (2, 1, N'Everguard Fast', N'EGE')
	INSERT @CD_Panel_Type ([Panel_Type_Code], [Language_Code], [Code_Value], [Code_Description]) VALUES (3, 1, N'VerySure', N'IVS')
	INSERT @CD_Panel_Type ([Panel_Type_Code], [Language_Code], [Code_Value], [Code_Description]) VALUES (4, 1, N'VerySureFast', N'IVF')
	INSERT @CD_Panel_Type ([Panel_Type_Code], [Language_Code], [Code_Value], [Code_Description]) VALUES (5, 1, N'Healthcare', N'HC')
	INSERT @CD_Panel_Type ([Panel_Type_Code], [Language_Code], [Code_Value], [Code_Description]) VALUES (6, 1, N'Everguard Fast 2', N'EGE2')
	INSERT @CD_Panel_Type ([Panel_Type_Code], [Language_Code], [Code_Value], [Code_Description]) VALUES (7, 1, N'ADL', N'ADL')
	INSERT @CD_Panel_Type ([Panel_Type_Code], [Language_Code], [Code_Value], [Code_Description]) VALUES (8, 1, N'ADL Express', N'ADL Express')

	MERGE INTO dbo.[CD_Panel_Type] AS TARGET  
	USING @CD_Panel_Type AS SOURCE  
	ON TARGET.[Panel_Type_Code] = SOURCE.[Panel_Type_Code] and  TARGET.[Language_Code] = SOURCE.[Language_Code]
	WHEN MATCHED THEN    
	UPDATE SET [Code_Value] = SOURCE.[Code_Value], [Code_Description] = SOURCE.[Code_Description]
	WHEN NOT MATCHED BY TARGET THEN   
	INSERT ([Panel_Type_Code], [Language_Code], [Code_Value], [Code_Description])   
	VALUES (SOURCE.[Panel_Type_Code], SOURCE.[Language_Code], SOURCE.[Code_Value], SOURCE.[Code_Description])  
	OUTPUT $action, SOURCE.*;

	--05. Add 3 rows to [dbo].[Roles]
	DECLARE @Roles TABLE ([Id] INT NOT NULL, [Name] NVARCHAR(100) NOT NULL, [Description] NVARCHAR(500) NULL, [NotificationProfile] TINYINT NOT NULL);

	INSERT INTO @Roles (Id, Name, Description, NotificationProfile) VALUES (1, 'Master', 'Master', 2)
	INSERT INTO @Roles (Id, Name, Description, NotificationProfile) VALUES (2, 'Standard', 'Standard User', 2)
	INSERT INTO @Roles (Id, Name, Description, NotificationProfile) VALUES (4, 'Community', 'Community User', 2)


	MERGE INTO [dbo].[Roles] AS TARGET  
	USING @Roles AS SOURCE  
	ON TARGET.[Id] = SOURCE.[Id]
	WHEN MATCHED THEN    
	UPDATE SET [Name] = SOURCE.[Name], [Description] = SOURCE.[Description], [NotificationProfile] = SOURCE.[NotificationProfile]
	WHEN NOT MATCHED BY TARGET THEN   
	INSERT ([Id], [Name], [Description], [NotificationProfile])   
	VALUES (SOURCE.[Id], SOURCE.[Name], SOURCE.[Description], SOURCE.[NotificationProfile])  
	OUTPUT $action, SOURCE.*;

	--06. Add 9 rows to [dbo].[Role_Group]
	DECLARE @Role_Group TABLE ([Id] INT NOT NULL, [Role_Id] INT NOT NULL);

	INSERT INTO @Role_Group ([Id], [Role_Id]) VALUES (1, 1)
	INSERT INTO @Role_Group ([Id], [Role_Id]) VALUES (1, 2)
	INSERT INTO @Role_Group ([Id], [Role_Id]) VALUES (2, 2)
	INSERT INTO @Role_Group ([Id], [Role_Id]) VALUES (3, 4)
	INSERT INTO @Role_Group ([Id], [Role_Id]) VALUES (4, 1)
	INSERT INTO @Role_Group ([Id], [Role_Id]) VALUES (4, 2)
	INSERT INTO @Role_Group ([Id], [Role_Id]) VALUES (5, 1)
	INSERT INTO @Role_Group ([Id], [Role_Id]) VALUES (5, 2)
	INSERT INTO @Role_Group ([Id], [Role_Id]) VALUES (5, 4)

	MERGE INTO [dbo].[Role_Group] AS TARGET  
	USING @Role_Group AS SOURCE  
	ON TARGET.[Id] = SOURCE.[Id] and TARGET.[Role_Id] = SOURCE.[Role_Id]
	WHEN NOT MATCHED BY TARGET THEN   
	INSERT ([Id], [Role_Id])   
	VALUES (SOURCE.[Id], SOURCE.[Role_Id])  
	OUTPUT $action, SOURCE.*;	
	
	
	