这是我的基本表格:
编号| SITE_WT | SITE_WT_DATA | SITE_NWT | SITE_NWT_DATA A
| 1 | NULL | 1 | NULL
这是我的选择和完整联接:
SELECT Number,T1.site ,T2.site,T3.site ,T4.site
FROM [A] AS T1
FULL JOIN [B] AS T2
ON T1.number=T2.number
FULL JOIN [C] AS T3
ON T2.number = T3.number
FULL JOIN [D] AS T4
ON T3.number=T4.number
结果如下:
number | SITE_WT | SITE_WT_DATA | SITE_NWT | SITE_NWT_DATA A | 1234
| NULL | NULL | NULL A | NULL | NULL | 1234
| NULL
我遇到了 Null 的问题,它打破了我的加入,我有重复项,因为正确的结果必须是,每个不同的数字只有一行,任何建议该怎么做
正确的结果:
number | SITE_WT | SITE_WT_DATA | SITE_NWT | SITE_NWT_DATA A | 1234
| NULL | 1234 | NULL