I would like to do a left join on the from Pymnt to Commission 3 times in MS ACCESS.
But no matter how I try, I can't get it right.
Table 1: Pymnt
PymntID Amt
1 10
2 20
3 30
Table 2: Commission
PymntID Type PCT
1 AGT 70
1 COM 20
1 MGR 10
2 AGT 80
2 COM 10
2 MGR 10
3 AGT 90
3 COM 10
The desired result after the join is:
1 AGT 70 COM 20 MGR 10
2 AGT 80 COM 10 MGR 10
3 AGT 90 COM 10
Can someone enlighten me how should the SQL be?
Thanks.
Eric
But no matter how I try, I can't get it right.
Table 1: Pymnt
PymntID Amt
1 10
2 20
3 30
Table 2: Commission
PymntID Type PCT
1 AGT 70
1 COM 20
1 MGR 10
2 AGT 80
2 COM 10
2 MGR 10
3 AGT 90
3 COM 10
The desired result after the join is:
1 AGT 70 COM 20 MGR 10
2 AGT 80 COM 10 MGR 10
3 AGT 90 COM 10
Can someone enlighten me how should the SQL be?
Thanks.
Eric