¿Cómo cambiar el valor de columna en la fila seleccionada?Hola a todos.
Quiero cambiar el valor de Col solo en la fila seleccionada usando JSL.
(por ejemplo, segundo valor Col: 14 -> 9999)
¿Puedo obtener algún consejo?
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 ) ) );
no puedo completarlo...
Por favor, ayúdame.
secuencias de comandosRe: ¿Cómo cambiar el valor de columna en la fila seleccionada?¡¡¡Muchas gracias!!!Re: ¿Cómo cambiar el valor de columna en la fila seleccionada?He anotado mi JSL en cuanto a cuál es el JSL correcto para hacer lo que está buscando hacer
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: ¿Cómo cambiar el valor de columna en la fila seleccionada?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>No sé por qué no funciona.