Choose Language Hide Translation Bar
Highlighted
Theresa
Level III

data table--N1 is the mother table, search column :name in A1 with table mother table N1 :name, if the name in A1 but not in mother table N1, then add all columns in A1 into mother table N1.

Below is the result i want, Would you help work out the script use this example?Thanks a lot, always.
The question i ask last week may not that clear, i find the answer is not what i want, so list another clear example.

 

Result i need with row data table N1 and A1:
N1 is the mother table, search column :name in A1 with table mother table N1 :name, if the name in A1 but not in mother table N1,
then add all columns in A1 into mother table N1. Finally, show out a new table with only show out column name, age and height.

 

 

//row data for this example
//Mother table
dt4 = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt4 << Delete Rows( 3 :: 8 );
dt4 << Delete Rows( 10 :: 30 );
dt4 << delete rows() << set name( "N1" );
dt4 << Delete Columns( 3 );

//Another table
dt5 = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt5 << select where( :age == 14 | :age == 12 | :age == 15 );
dt5 << delete rows() << set name( "A1" );

 

1 REPLY 1
Highlighted
Byron_JMP
Staff

Re: data table--N1 is the mother table, search column :name in A1 with table mother table N1 :name, if the name in A1 but not in mother table N1, then add all columns in A1 into mother table N1.

Hello,

I'm not 100% sure I understand the question completely.  It sounds like you would like to do a Join across two tables and have the resulting table turn out with only some of the selected columns.

 

this might help, if that is indeed what you are trying to do.

https://www.jmp.com/support/help/en/15.2/index.shtml#page/jmp/join-data-tables-2.shtml#

JMP Systems Engineer, Pharm and BioPharm Sciences
Article Labels