In this video, you learn how to join two files together using a matching column.
The file Rejects.jmp has information about rejected parts by order number, item number, and reject code. This is your working data table.
The reject codes are two-digit codes, but they’re not descriptive.
The file RejectCodes.jmp includes the reject codes, along with the reject reason.
You’d like to add the reject reasons to your working data table.
To do this, we make the working file, Reject.jmp, the active file. Then we select Join from the Tables menu.
You want to join the file Rejects.jmp with the file RejectCodes.jmp.
There are three options for Matching Specification: By Row Number, Cartesian Join, and By Matching Column. We’ll join the files by matching column. We select Reject Code from the working file, and Code from the join file, and click Match.
The match options are related to how to handle multiple values and what to do if there are nonmatches. You can also select columns from the tables that you want to include in joined table.
There are additional options at the top. You can update the main working table with data from the join table, merge columns from the two tables that have the same name, and include a flag that indicates a match was found.
This example is relatively straightforward, but joining tables can be somewhat complicated. For information about the available options, you can use the Help button in the Join window.
We’ll use all of the default options.
We’ll change the name of the joined table to Rejects 2.jmp, and click OK.
The new file has 309 observations, which is the same as your original file. This is good!
Two new columns were added from the Reject Code file: Code and Reason.
You can see that Code is the same as Reject Code, so we’ll delete this redundant column.
This is your final file. It is the same as your original file, but the reject reasons have been added.