INSERT INTO VCLib.T_BASE_KKM_SETTINGS
           (KkmSettingsID
           ,Host
           ,Port
           ,Login
           ,Password
           ,DeviceNumber
           ,TimeOut
           ,Fio
           ,Inn
           ,KkmName
           ,type_)
select KkmSettingsID
           ,Host
           ,Port
           ,Login
           ,Password
           ,DeviceNumber
           ,TimeOut
           ,Fio
           ,Inn
           ,KkmName
           ,(select EntityID from VCLib.T_ENTITIES where EntName = 'KKM_SETTINGS' and  EntDesc = 'Настройки ккм') 
from AKUZ.T_KKM_SETTINGS kkm;