if exists(select * from IES.T_COMPANY_SETTINGS cs where cs.IsDeferredDelete = 1)
INSERT INTO [VCLib].[T_HOLDER_STARTUP_CUSTOM]
           ([HolderStartupCustomID]
           ,[Holder]
           ,[StartupType])
     select
           NEWID()--<HolderStartupCustomID, uniqueidentifier,>
          ,(select top 1 h.HolderID from VCLib.T_HOLDER h where h.Name = 'PostponedSetDeleteHandler')--<Holder, uniqueidentifier,>
          ,0--<StartupType, int,>)
where not exists
    (
        select *
        from [VCLib].[T_HOLDER_STARTUP_CUSTOM] hsc
            join VCLib.T_HOLDER hl on hl.HolderID = hsc.Holder
        where hl.Name = 'PostponedSetDeleteHandler'
    )
GO
