ALTER TABLE [AKUZ].[T_UNDERAGE_EXAMINATION] ADD [SexualFormulaBoyAx] int NULL
GO

ALTER TABLE [AKUZ].[T_UNDERAGE_EXAMINATION] ADD [SexualFormulaBoyG] int NULL
GO

ALTER TABLE [AKUZ].[T_UNDERAGE_EXAMINATION] ADD [SexualFormulaBoyP] int NULL
GO

ALTER TABLE [AKUZ].[T_UNDERAGE_EXAMINATION] ADD [SexualFormulaBoyTe] int NULL
GO

ALTER TABLE [AKUZ].[T_UNDERAGE_EXAMINATION] ADD [SexualFormulaGirlAx] int NULL
GO

ALTER TABLE [AKUZ].[T_UNDERAGE_EXAMINATION] ADD [SexualFormulaGirlMa] int NULL
GO

ALTER TABLE [AKUZ].[T_UNDERAGE_EXAMINATION] ADD [SexualFormulaGirlMe] int NULL
GO

ALTER TABLE [AKUZ].[T_UNDERAGE_EXAMINATION] ADD [SexualFormulaGirlP] int NULL
GO

update AKUZ.T_UNDERAGE_EXAMINATION
set SexualFormulaBoyP = SUBSTRING(SexualFormulaBoy, 2, 1)
    , SexualFormulaBoyAx = SUBSTRING(SexualFormulaBoy, 6, 1)
where SexualFormulaBoy is not null

update AKUZ.T_UNDERAGE_EXAMINATION
set SexualFormulaGirlP = SUBSTRING(SexualFormulaGirl, 2, 1)
    , SexualFormulaGirlAx = SUBSTRING(SexualFormulaGirl, 6, 1)
    , SexualFormulaGirlMa = SUBSTRING(SexualFormulaGirl, 10, 1)
    , SexualFormulaGirlMe = SUBSTRING(SexualFormulaGirl, 14, 1)
where SexualFormulaGirl is not null

alter table AKUZ.T_UNDERAGE_EXAMINATION drop column SexualFormulaGirl