Ciao, qui ho riscontrato un problema. Ho due tavoli. Uno è la tabella principale che ha un record di 847 righe. Ha registrato ogni min. Ora spero di poter fare clic su JSL una volta in modo che ogni minuto presente una riga sia stato spostato automaticamente dalla tabella principale alla tabella 2. Ciò significa che dopo 60 minuti ci sono 60 righe in Table2. 120 minuti dopo, ci sono 120 righe in Tables2. Fino alla fine dopo 847 min.
Grazie in anticipo.
GMan
Ecco un esempio semplificato di come eseguire l'aggiornamento minuto per minuto.Se ci giochi un po', dovresti ottenere ciò di cui hai bisogno
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
// Reduce the number of rows to a reasonable number for the test
dt << select rows( {1, 2, 3} );
dt << invert row selection;
dt << delete rows;
// Create the output table
dt2 = New Table( "update",
New Column( "time updated", Format( "d/m/y h:m:s", 17 ) ),
New Column( "Name", character )
);
Wait( 0 );
// Set the initial values
begin = Today();
TheRow = -1; // set to -1 so first row will be immediatly written
// Loop until the minute has changed, then update
While( TheRow + 2 <= N Rows( dt ),
If( Date Difference( begin, Today(), "Minute", "actual" ) > TheRow,
dt2 << Begin Data Update;
dt2 << Add Rows( 1 );
dt2:time updated[N Rows( dt2 )] = Today();
dt2:Name[N Rows( dt2 )] = dt:Name[TheRow + 2];
dt2 << End Data Update;
Wait(55);
TheRow++;
);
// This is optional, but it should reduce the cpu cycle impact if used
Wait(1);
);