ALTER TABLE [AKUZ].[T_CDA_SVEDEN_RODAH_CHILDBIRTH] ADD IdEhrColumn int NULL
GO
update child
set IdEhrColumn = ehr.IdEHR
from AKUZ.T_CDA_SVEDEN_RODAH_CHILDBIRTH child
join EHR.T_EHR_RUS_42Q2UOMG02 ehr on child.EhrRus42q2uomg02 = ehr.EhrRusID
go 
ALTER TABLE [AKUZ].[T_CDA_SVEDEN_RODAH_CHILDBIRTH] DROP CONSTRAINT [FK_T_EHR_RUS_42Q2UOMG02_T_CDA_SVEDEN_RODAH_CHILDBIRTH_EhrRus42q2uomg02]
GO
exec dbo.sp_AlterDropColumn '[AKUZ].[T_CDA_SVEDEN_RODAH_CHILDBIRTH]' , 'EhrRus42q2uomg02', 0
GO

ALTER TABLE [AKUZ].[T_CDA_SECTION_DOCINFO_SPORT] DROP CONSTRAINT [FK_T_EHR_RUS_VIDI_SPORTA_T_CDA_SECTION_DOCINFO_SPORT_EhrRusVidiSporta]
GO
exec dbo.sp_AlterDropColumn '[AKUZ].[T_CDA_SECTION_DOCINFO_SPORT]' , 'EhrRusVidiSporta', 0
GO

