Here are 3 different ways to do this.....and I am sure others may have other ways to do this
names default to here(1);
dt = Open( "$SAMPLE_DATA/BIG CLASS.JMP" );
dt1 = dt << Subset( Columns( Name ), Output Table Name( "1" ) );
dt1 << Delete Rows( 15 :: 40 );
// Method one, read a name in dt1 and select it in dt, repeat
// for all rows in dt1
dt << clear rowstates;
For(i=1,i<= nrows(dt1),i++,
dt << select where(dt:name == dt1:name[i], current selection("extend"));
);
// Method 2, extract names from dt1 into a list, and then
// compare against the list for the
dt << clear rowstates;
nameList = dt1:name << get values;
dt << select where(contains(nameList,:name));
//Method 3, Update dt with dt1 and select matching rows
// this method would be the fastest on large data tables
dt << clear rowstates;
// add a column to use as a selector
dt1 << New Column( "selector", set each value( 1 ) );
dt << Update( With( dt1 ), Match Columns( :name = :name ) );
dt << select where( :selector == 1 );
dt << delete columns( "selector" );
dt1 << delete columns( "selector" );
Jim