Greetings!
I am trying to Concatenate query results, from several tables in a directory, into one single table. I am using loop to read/query the tables and concatenate the results. The result table is fine but each intermediate concatenated tables keeps opening consuming the memory.
Thank you for any suggestions to to avoid opening each intermediate result tables but just updating the data frame which can be displayed as the result table only after the loop is completed.
I am using JMP 17 Pro.
names default to here(1);<BR />dirLoc=Pick Directory("Select a directory", "myDirectory\");
fileList = Files In Directory(dirLoc);
dt1 = open(dirLoc || fileList[1]);
dt1 << Select Where( :Amount >= 500 );
x=dt1 << Subset ( Output Table Name("T1") );
Close(dt1, NoSave);
For(i = 2, i <= N Items( fileList ), i++,
dt = open(dirLoc || fileList[i] );
dt << Select Where( :Amount >= 500 );
y = dt << Subset ( Output Table Name("Temp"));
x = x << Concatenate( y);
Close(dt, NoSave);
Close(y, NoSave);
);
result = x<<Subset ( Output Table Name("Result"));