Tabella di query JSL: risultato strano<BR />dirLoc=Pick Directory("Select a directory", "my directory");
fileList = Files In Directory(dirLoc);
dt1 = open(dirLoc || fileList[1]);
dt1 << Select Where( :Amount>=1000 );
x=dt1<<SUBSET></SUBSET>Greetings!
I am trying a simple query with a sample data file. The query returns right set of results if there is any record satisfying the condition in "Where" clause. But, in case, there exist no record satisfying the condition, it returns all the records where expected result is an empty set. Even, when I try to see how many records (N Row()) in the resultant set, it shows the count of total records.<BR /><BR />Thanks for any suggestion and please let me know if I am missing anything.
<LINGO-LABS id="lingo-labs-722288" slang="en-US" mode="CREATE"><LINGO-LABEL>Accesso ai dati</LINGO-LABEL></LINGO-LABS>Ri: Tabella di query JSL: risultato stranoCiao Jim,
Grazie per la tua rapida risposta In realtà, sto cercando di concatenare i risultati della query da più tabelle. Fammi provare il tuo suggerimento. Per favore condividi se hai qualche pensiero al riguardo.
Grazie ancora!
Ri: Tabella di query JSL: risultato stranoGestirei questo controllando per vedere se sono state selezionate delle righe e, in tal caso, eseguire il sottoinsieme e, in caso contrario, stampare un messaggio.
dirLoc = Pick Directory( "Select a directory", "my directory" );
fileList = Files In Directory( dirLoc );
dt1 = Open( dirLoc || fileList[1] );
dt1 << Select Where( :Amount >= 1000 );
If( Length( dt1 << get selected rows ) > 0,
x = dt1 << Subset( Output Table Name( "T1" ) );
Close( dt1, NoSave );
Show( N Row( x ) );
x << Save( "my directory\t1.jmp" );
,
Show( "no rows selected" )
);