Примерно так ... примеры данных всегда помогают ...
drop table t2;
drop table t2a;
drop table t2b;
create table #t2 (wrg_kurs int, type_sett_inst int, sort_kz int, some_val int);
create table #t2a (wrg_kurs int, type_sett_inst int, sort_kz int, some_val int);
create table #t2b (wrg_kurs int, type_sett_inst int, sort_kz int, some_val int);
insert into #t2 values (1, 1, 1, 9), (1, 2, 1, 9), (1, 3, 1, 21);
insert into #t2a values (1, 2, 1, 3), (1, 3, 1, 23), (1, 4, 1, 49);
insert into #t2b values (2, 2, 1, 3), (1, 2, 1, 7), (1, 4, 1, 32), (1, 5, 1, 51);
with
t2_t2a_foj as
(
SELECT case when A.wrg_kurs is null then B.wrg_kurs else A.wrg_kurs end as wrg_kurs
,case when A.type_sett_inst is null then B.type_sett_inst else A.type_sett_inst end as type_sett_inst
,case when A.sort_kz is null then B.sort_kz else A.sort_kz end as sort_kz
,isnull(a.some_val, 0) + isnull(b.some_val, 0) as some_val
,A.some_val as t2_some_val
,B.some_val as t2a_some_val
FROM #t2 A
FULL JOIN
#t2a B
ON B.wrg_kurs = A.wrg_kurs
AND B.type_sett_inst = A.type_sett_inst
AND B.sort_kz = A.sort_kz
)
SELECT case when A.wrg_kurs is null then B.wrg_kurs else A.wrg_kurs end as wrg_kurs
,case when A.type_sett_inst is null then B.type_sett_inst else A.type_sett_inst end as type_sett_inst
,case when A.sort_kz is null then B.sort_kz else A.sort_kz end as sort_kz
,isnull(A.some_val, 0) + isnull(B.some_val, 0) as some_val
,A.t2_some_val as t2_some_val
,A.t2a_some_val as t2_some_val
,B.some_val as t2a_some_val
FROM t2_t2a_foj A
FULL JOIN
#t2b B
ON A.wrg_kurs = B.wrg_kurs
AND A.type_sett_inst = B.type_sett_inst
AND A.sort_kz = B.sort_kz