Hi Vineet,
Join in an union is possible with the below scenarios as example,
If you notice in Table T2 & T3 ,
My account number hold different categories and loaded in different targets & we dint consolidated into a single data target to avoid data loads , So I have used left outer join in this scenario.
Let me know if you have more questions.
Thx,
Pre
T1 | ||
Doc# | AcctNum | Price Unit |
111 | AA1001 | 4 |
222 | AA1001 | 5 |
333 | BB1003 | 2 |
444 | BB1003 | 7 |
555 | AA1004 | 55 |
555 | AA1004 | 34 |
T2 | |||
Doc# | AcctNum | Net Price | Price Unit |
111 | AA1001 | $90 | 4 |
222 | AA1001 | $45 | 5 |
555 | AA1004 | $48 | 55 |
555 | AA1004 | $49 | 34 |
T3 | |||
Doc# | AcctNum | Net Price | Price Unit |
333 | BB1003 | $46 | 2 |
444 | BB1003 | $47 | 7 |
Left Join | T1:T2 | ||
Doc# | AcctNum | Net Price | Price Unit |
111 | AA1001 | $90 | 4 |
222 | AA1001 | $45 | 5 |
333 | BB1003 | 2 | |
444 | BB1003 | 7 | |
555 | AA1004 | $48 | 55 |
555 | AA1004 | $49 | 34 |