Example: Union All
This scenario shows how the Join function merges the two input tables based on a set of rules.
|
|
Filter the tables first so that you have only the required entries:
-
For the Material Table, we set the condition to M1001, M1002 and M1003.
-
For the Product Table, we set the condition to P0001, P0002 and P0003.
Based on the selection conditions we set in the subview of each rule, we will have the following tables:
|
|
If we are using an explicit type of join, the fields that we define in the subview of each rule will be the output. However, we need to specify all the fields that we need in the subview of each rule because we need to have the same fields across the subview for the explicit view to work.
Union All is used to combine the result sets of two or more tables. It does not remove duplicate rows and all rows are returned.
| Material Code | Material | Product Code | Product | Cost per Order | Price | Currency |
|---|---|---|---|---|---|---|
| M1001 | Paper | 3 | 0 | USD | ||
| M1002 | Plastic | 3 | 0 | USD | ||
| M1003 | Wax | 4 | 0 | USD | ||
| P0001 | Shoe | 0 | 75 | EUR | ||
| P0002 | Watch | 0 | 300 | EUR | ||
| P0003 | Shirt | 0 | 80 | EUR |