Hi everybody,
I would like to select rows based on the entries of selected rows from another table. Below a code snippet. The last row is not valid, but it should clarify what I mean.
selected_row_idx = DT << Get Selected Rows;
measurement_starts = DT:MeasurementStart[selected_row_idx];
measurement_ends = DT:MeasurementEnd[selected_row_idx];
DTmeas << Select Where(measurement_starts[1] <= :TimeStamp <= measurement_ends[1] & measurement_starts[2] <= :TimeStamp <= measurement_ends[2] & ... & measurement_starts[n] <= :TimeStamp <= measurement_ends[n]);
How can I write the last row in some dynamical way, so that I have as many conditions there connected with "&" as I have rows selected in table DT? I could write a loop and filter subsets iteratively, but this is kind of lame. Or I could put together the last row as a string and parse and execute it, but that is not nice, either. Is there an elegant way to do this?