
DECLARE @Filters TABLE 
	(
		[Description] [nvarchar](50) NOT NULL,
		[ClassName] [nvarchar](500) NOT NULL
	);

	INSERT @Filters ([Description], [ClassName]) VALUES (N'AgeFilter filter', N'ESI.EventUploader.Filters.AgeFilter.AgeFilter, ESI.EventUploader.Filters.AgeFilter')

	MERGE INTO [dbo].Filters AS TARGET
	USING @Filters AS SOURCE
	ON TARGET.[ClassName] = SOURCE.[ClassName]
	WHEN MATCHED THEN    
	UPDATE SET 
		[Description] = SOURCE.[Description],
		[ClassName] = SOURCE.[ClassName] 
	WHEN NOT MATCHED BY TARGET THEN
		INSERT ([Description],[ClassName])
		VALUES (SOURCE.[Description],source.[ClassName])
	OUTPUT $ACTION, SOURCE.*;