
--UnitOrganization Setting Type
	
	DECLARE @UnitOrganizationSettingsTypes TABLE (RowId uniqueidentifier NOT NULL,[Name] [nvarchar](500) NOT NULL,SettingsType int NOT NULL);

	INSERT into @UnitOrganizationSettingsTypes (RowId, [Name], SettingsType) VALUES ('6428D1C2-D16B-4DD4-BCE4-929E450499DE', N'TimeZoneId',2);
	INSERT into @UnitOrganizationSettingsTypes (RowId, [Name], SettingsType) VALUES ('CA7E4505-2490-4997-A673-628F82E508AC', N'TeleHealthEnabled',3);

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

