Wie ändere ich den Col-Wert in der ausgewählten Zeile?Hallo allerseits.
Ich möchte den Col-Wert nur in einer ausgewählten Zeile mithilfe von JSL ändern.
(zB zweiter Col-Wert: 14 -> 9999)
Kann ich einen Rat bekommen?
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 ) ) );
Ich kann es nicht vervollständigen ...
Bitte hilf mir.
SkriptingBetreff: Wie ändere ich den Col-Wert in der ausgewählten Zeile?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>Ich weiß nicht, warum es nicht funktioniert.
Betreff: Wie ändere ich den Col-Wert in der ausgewählten Zeile?Ich habe meine JSL mit Anmerkungen versehen, welche JSL die richtige ist, um das zu tun, was Sie tun möchten
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: Wie ändere ich den Col-Wert in der ausgewählten Zeile?Vielen Dank!!!