INSERT INTO AKUZ.T_RDS_SYNCHRONIZATION_CONFIG
           (Entities
           ,ProcessName
           ,MessageType
           ,LockResourcePath
           ,LockGroupName
           ,ProcessType
           ,Operations
           ,IgnoreNullResource
           ,RdsQueue
           ,RdsSynchronizationConfigID
           ,PathToImportServer)
select		Entities
           ,ProcessName
           ,'SIGNED_RECIPE'
           ,LockResourcePath
           ,LockGroupName
           ,ProcessType
           ,Operations
           ,IgnoreNullResource
           ,RdsQueue
           ,newid()
           ,PathToImportServer 
from AKUZ.T_RDS_SYNCHRONIZATION_CONFIG c
where c.MessageType = 'RECIPE'
and not exists(select * from AKUZ.T_RDS_SYNCHRONIZATION_CONFIG cc where cc.MessageType = 'SIGNED_RECIPE');

