insert into VCCC.T_APPEAL_COMPLAINTS(AppealComplaintsID, AppealToCallCenter, ComplaintOrganizationId, type_)
select
newid(),
cc.AppealToCallCenterID,
cc.ComplaintOrganizationID,
(select EntityID from VCLIB.T_ENTITIES e where e.[EntName] = 'APPEAL_COMPLAINTS' and e.[Schema] = 'ISZL')
from vccc.T_APPEAL_TO_CALL_CENTER as cc