Joining on more than one key
You can specify more than one join condition when joining two data sets. For example, you can join a customers data set with a sales offices data set, shown in
Figure 10‑15, to find the names of customers and sales managers that are located in the same city and state.
Figure 10‑15 Data sets with two common fields, City and State
You would create the following join conditions:
The first condition, shown in
Figure 10‑16, compares the State values in the Customer and SalesOffices data sets and looks for a match.
Figure 10‑16 Joining on a State field
The second condition, shown in
Figure 10‑17, compares the City values in both data sets and looks for a match.
Figure 10‑17 Joining on a City field
The joined data set returns the results shown in
Figure 10‑18, if the join type is fullOuter.
Figure 10‑18 Data rows returned by the joined data set