Hi everyone !
I have two data tables, the example is as below,
DT1
No. of Record | Start ID no. | End ID no.
5 | 486901 | 486905
7 | 654101 | 654027
DT2
Index | ID no.
1 | 486901
2 | 486902
3 | 486903
4 | 486904
5 | 486905
6 | 486906
7 | 486907
8 | 486908
9 | 486909
10 | 4869010
11 | 654101
12 | 654102
13 | 654103
14 | 654104
15 | 654105
16 | 654106
17 | 654107
18 | 654108
19 | 654109
20 | 654110
I would like to extract the data from DT2 according to the information from DT1. Eventually, my expected outcome is,
DT2
6 | 486906
7 | 486907
8 | 486908
9 | 486909
10 | 4869010
18 | 654108
19 | 654109
20 | 654110
DT3
1 | 486901
2 | 486902
3 | 486903
4 | 486904
5 | 486905
11 | 654101
12 | 654102
13 | 654103
14 | 654104
15 | 654105
16 | 654106
17 | 654107
How could I do this?