UPDATE [VCLib].[T_OBJECT_MODIFICATION_ACTION]
SET [Instruction] = CONCAT('APS.', [Instruction])
WHERE [Instruction] NOT LIKE 'APS.%'
    AND [Instruction] NOT LIKE 'STOR.%'
    AND [Instruction] NOT LIKE 'VCLIB.%'
    AND [Instruction] NOT LIKE 'EHR.%'
    AND [Instruction] NOT LIKE 'IDB.%'
    AND [Instruction] NOT LIKE 'PHARM.%'
    AND [InstructionType] = 0
    AND [Instruction] LIKE 'sp_%';

UPDATE [APS].[t_rds_synchronization_config]
SET [ProcessName] = CONCAT('APS.', [ProcessName])
WHERE
    [ProcessName] NOT LIKE 'APS.%'
    AND [ProcessName] NOT LIKE 'STOR.%'
    AND [ProcessName] NOT LIKE 'VCLIB.%'
    AND [ProcessName] NOT LIKE 'EHR.%'
    AND [ProcessName] NOT LIKE 'IDB.%'
    AND [ProcessName] NOT LIKE 'PHARM.%'
    AND [ProcessType] = 0
    AND [ProcessName] LIKE 'sp_%';
