
DECLARE @ECHPGetGroups TABLE (
		[EhcpEvent] [nvarchar](200) NOT NULL,
	[bGetGroup] [nvarchar](50) NOT NULL
)
INSERT @ECHPGetGroups([EhcpEvent], [bGetGroup]) VALUES ('E_ALERT_TYPE_NoActivityDetected', 'GetLowActivityAlert')
INSERT @ECHPGetGroups([EhcpEvent], [bGetGroup]) VALUES ('E_ALERT_TYPE_At_Home_Alert', 'bGetNtAtHm')
  
INSERT @ECHPGetGroups([EhcpEvent], [bGetGroup]) VALUES ('E_ALERT_TYPE_CaregiverPresence', N'bGetPanic')
INSERT @ECHPGetGroups([EhcpEvent], [bGetGroup]) VALUES ('E_ALERT_TYPE_ActivityAlarmCancelled', N'GetExcessiveActivityAlert')

INSERT @ECHPGetGroups([EhcpEvent], [bGetGroup]) VALUES ('E_ALERT_TYPE_Missed_Reminder', N'bGetPanic')

INSERT @ECHPGetGroups([EhcpEvent], [bGetGroup]) VALUES ('E_ALERT_TYPE_ReminderStatus', N'bGetActvt')

MERGE INTO [dbo].[ECHPGetGroups] AS TARGET  
USING @ECHPGetGroups AS SOURCE  
ON TARGET.[EhcpEvent] = SOURCE.[EhcpEvent] AND TARGET.[bGetGroup] = SOURCE.[bGetGroup]
WHEN NOT MATCHED BY TARGET THEN
INSERT ([EhcpEvent], [bGetGroup])
VALUES (SOURCE.[EhcpEvent], SOURCE.[bGetGroup]);