I think you could use matrices, sql, building expression,...
Names Default To Here(1);
dt1 = New Table("Untitled",
Add Rows(3),
Compress File When Saved(1),
New Column("A", Numeric, "Continuous", Format("Best", 12), Set Values([1, 1, 5])),
New Column("B", Numeric, "Continuous", Format("Best", 12), Set Values([2, 3, 6]))
);
dt1 << Select Rows(1::3);
starts = dt1[dt1 << get selected rows, {"A"}];
ends = dt1[dt1 << get selected rows, {"B"}];
dt1 << clear select;
dt2 = New Table("Untitled 2",
Add Rows(5),
Compress File When Saved(1),
New Column("Column 1", Numeric, "Continuous", Format("Best", 12), Set Values([1, 2, 3, 4, 5]))
);
dt2 << Select Where(
N Items(Loc((starts <= :Column 1)` + (ends >= :Column 1)` >= 2)) > 0
)
-Jarmo