我有3个查询使用相同的列:Date,ProductCode,ProductDesc,TotalWeight,TaskPrice。
日期ProductCode ProductDesc TotalWeight TaskPrice
01/01/2014 A1 A1 3.25 225
01/02/2014 A2 A2 3.25 200
01/02/2014 A3 A3 3.25 300
01/03/2014 A4 A4 3.25 150
日期ProductCode ProductDesc TotalWeight TaskPrice
01/03/2014 A2 A2 3.25 200
01/03/2014 A3 A3 3.25 300
日期ProductCode ProductDesc TotalWeight TaskPrice
01/02/2014 A1 A1 3.25 225
01/04/2014 A4 A4 3.25 150
我想将数据合并到一个查询结果中:
日期PCIN PDIN TWIN TPIN PCOut PDOut TWtOUT TPOut PCSell PDSell TWSell TPSell
01/01/2014 A1 A1 3.25 225 NUll NUll NUll NUll NUll NUll NUll NULL
01/02/2014 A2 A2 3.25 200 NUll NUll NUll NUll A1 A1 3.25 225
01/02/2014 A3 A3 3.25 300 NUll NUll NUll NUll NUll NUll NUll NULL
01/03/2014 A4 A4 3.25 150 A2 A2 3.25 200 NUll NUll NUll NULL
01/03/2014 NULL NULL NULL NULL A3 A3 3.25 300 NUll NUll NUll NULL
01/04/2014 NULL NULL NULL NULL NUll NUll NUll NUll A4 A4 3.25 150
我该怎么做?请帮我。非常感谢!