선택한 행에서 Col 값을 변경하는 방법은 무엇입니까?안녕하세요 여러분.
JSL을 사용하여 선택한 행에서만 Col 값을 변경하고 싶습니다.
(ex, 두 번째 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 ) ) );
완성이 안되네요...
도와주세요.
스크립팅Re: 선택한 행의 열 값을 어떻게 변경합니까?매우 감사합니다!!!Re: 선택한 행의 열 값을 어떻게 변경합니까?원하는 작업을 수행하는 데 올바른 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>
Re: 선택한 행의 열 값을 어떻게 변경합니까?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>왜 작동하지 않는지 모르겠습니다.