
declare @RoleAuthorizationGroupTypes table(
	[Name] [nvarchar](50) NOT NULL,
	[guid] [uniqueidentifier] NULL
)



insert into @RoleAuthorizationGroupTypes (name,guid) values('Get Batches','1DB93246-E71B-4004-ACAA-F0DC4EF94100')



MERGE INTO [dbo].RoleAuthorizationGroupTypes AS TARGET
USING @RoleAuthorizationGroupTypes AS SOURCE
	ON TARGET.guid = SOURCE.guid
	WHEN MATCHED THEN    
			UPDATE SET name=source.name
	WHEN NOT MATCHED BY TARGET THEN   
			INSERT ( name,guid) VALUES (Source.name, SOURCE.guid)  
OUTPUT $action, SOURCE.*;


