HI, this will probably do what you are looking for
Names Default To Here( 1 );
// opens Table
dt1 = Open( "$SAMPLE_DATA/Big Class.jmp" );
//generate update Table
dt2 = dt1 << Clear Select << Select Rows( Index( 1, 8 ) ) << Subset( Selected Rows( 1 ), Selected columns only( 0 ) );
// delete contend
for(k=4,k<=ncols(dt1),k++,column(dt1,k)[(1 :: 8)]=.);
//select columns
dt1 << Clear select;
wait(0.1);
dt1 << Select Rows ( (3::5) );
wait(0.1);
// ### scrpit only with selected rows
// get selected rows
s_rows = dt1 << Get Selected Rows();
// create a new column with selected rows as 1
n_c1 = dt1 << new column();
n_c1[s_rows]=1;
// create a new column on the update table
n_c2 = dt2 << New Column("temp",Numeric,"Continuous",<<Set Initial Data( 1 ));
// update only where the 1 is present (selected rows only)
dt1 << Update(
With( dt2 ),
Match Columns( :name = :name, n_c1 = n_c2 ),
);
// delete the columns
dt1 << Delete Columns(n_c1);
dt2 << Delete Columns(n_c2);
"I thought about our dilemma, and I came up with a solution that I honestly think works out best for one of both of us"
- GLaDOS