ALTER TABLE [AKUZ].[T_ONK_ANATOMICAL_GLASS] ADD [ResearchMaterial] varchar(256) NULL
GO

update oag
set oag.ResearchMaterial = erd.NameEHR
from AKUZ.T_ONK_ANATOMICAL_GLASS oag
inner join EHR.T_EHR_RUS_DGU0H3GBK1 erd
    on erd.EhrRusID = oag.EhrRusDgu0h3gbk1

ALTER TABLE [AKUZ].[T_ONK_ANATOMICAL_GLASS] ALTER COLUMN [ResearchMaterial] varchar(256) NOT NULL

ALTER TABLE [AKUZ].[T_ONK_ANATOMICAL_GLASS] DROP CONSTRAINT [FK_T_EHR_RUS_DGU0H3GBK1_T_ONK_ANATOMICAL_GLASS_EhrRusDgu0h3gbk1]
GO

exec dbo.sp_AlterDropColumn '[AKUZ].[T_ONK_ANATOMICAL_GLASS]' , 'EhrRusDgu0h3gbk1', 0
GO