Skip to Content
Former Member
Apr 16, 2017 at 04:26 PM

More efficient algorith for comparing values in two tables


I have two tables:
Table 1: Field 1: AreaRange A, Field B: AreaRange 2

Table 2: Area

I coded it in a way, that it LOOPS AT Table 1, then within that loop LOOPS through each row of Table 2 and checks if the area is within range.

This can not be efficient.

I need multiple results, not just one. In fact each Area in Table 2 is represented by a range in Table 1.

Do you have a suggestion for a more effective approach, which loops less at the tables?