Join, also known as horizontal join or concatenate, combines data tables side to side.
Update, // Replaces the data in the main table with the corresponding data from the secondary table.
To try this, first break Big Class.jmp into two parts:
part1 = dt << Subset(
Output Table Name( "Big Class 1" )
part2 = dt << Subset(
Output Table Name( "Big Class 2" )
part1 << Join(
Output Table Name( "Joined Parts" );
The resulting table has two copies of the name variable, one from each part, and you can inspect these to see how Join worked. Notice that you now have four Robert rows, because each part had two Robert rows (there were two Roberts in the original table) and Join formed all possible combinations.
提示:To maintain the order of the original data table in the joined table (instead of sorting by the matching columns), include Preserve Main Table Order(). This function speeds up the joining process.