如何更改選定行中的 Col 值?大家好。
我想使用 JSL 僅更改選定行中的 Col 值。
(例如,第二個 Col 值:14 -> 9999)
我可以得到一些建議嗎?
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
Current Data Table() << Sort( replace table, Column( address, 2 ), Order( Ascending ) );
Current Data Table() << Sort( replace table, Column( address, 4 ), Order( Ascending ) );
//wait(1);
dt << Select duplicate rows( Match( Column(dt, 2), Column(dt, 3 ), Column(dt, 4 ) ) );
我無法完成它...
請幫我。
自動化和腳本編寫消費者和市場研究回复:如何更改所選行中的 Col 值?非常感謝!!!回复:如何更改所選行中的 Col 值?我已經在我的 JSL 中註釋了什麼是正確的 JSL 來完成您想要做的事情
names default to here(1);
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
// The sort is not required for the Select duplicate rows to work
// The 2 sorts you specified, first sorted all of the rows by age and
// then sorted all of the rows by height. I think what you were looking
// to do, was to sort all of the heights within each age group. That
// would be accomplished with the line of code below
dt << Sort( replace table, by( Column( 2 ),Column( 4 ) ), Order( Ascending, Ascending ) );
dt << Select duplicate rows( Match( Column( dt, 2 ), Column( dt, 3 ), Column( dt, 4 ) ) );
aa = dt <<GET selected="" rows=""> 0,
// All you need is a simple assignment statement setting all of the rows found for the column
// age equal to 9999
(Column(dt,2)[aa]) = 9999;
);</GET>
回复:如何更改所選行中的 Col 值?dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
Current Data Table() << Sort( replace table, Column( address, 2 ), Order( Ascending ) );
Current Data Table() << Sort( replace table, Column( address, 4 ), Order( Ascending ) );
//wait(1);
dt << Select duplicate rows( Match( Column( dt, 2 ), Column( dt, 3 ), Column( dt, 4 ) ) );
aa = dt <<GET selected="" rows=""> 0,
Column(dt,2) << Set Values("9999");
);
</GET>我不知道為什麼它不起作用。