我正在尝试在 SQL Server 中合并 2 个表
表格1:SO
ItemCode | SONumber| SODate | SOQTY
-------------------------------------------
TBJ182-01-02 | 0005251 | 29/01/2014 | 5
TBJ184-01-02 | 0005251 | 29/01/2014 | 2
TBJ182-01-02 | 0005554 | 15/02/2014 | 4
TBJ185-01-02 | 0005554 | 15/02/2014 | 5
表 2:PO
ItemCode | PONumber| PODate | POQTY
--------------------------------------------
TBJ182-01-02 | 0009105 | 11/02/2014 | 8
TBJ184-01-02 | 0009208 | 14/02/2014 | 5
TBJ189-01-02 | 0009208 | 14/02/2014 | 5
结果表:
ItemCode | SONumber| SODate | SOQTY | PONmber |PODate | POQTY
-------------------------------------------------------------------------
TBJ182-01-02 | 0005251 | 29/01/2014| 5 | | |
TBJ184-01-02 | 0005251 | 29/01/2014| 2 | | |
TBJ182-01-02 | 0005554 | 15/02/2014| 4 | | |
TBJ185-01-02 | 0005554 | 15/02/2014| 5 | | |
TBJ182-01-02 | | | | 0009105 | 11/02/2014 | 8
TBJ184-01-02 | | | | 0009208 | 14/02/2014 | 5
TBJ189-01-02 | | | | 0009208 | 14/02/2014 | 5
你能帮忙吗?