I was able to figure out the error from earlier, but i have one more request.
If i have other fields in the table i want to also show on the out_table for example see table below:
| Data | UniqueID | Item ID | Begin | End | Input Table |
| Observation1 | 555 | 1000 | 0 | 1 |
| 555 | 1001 | 0 | 5 |
| 555 | 1002 | 1 | 7 |
| 555 | 1003 | 4 | 5 |
| 555 | 1004 | 3 | 5 |
| Observation2 | 600 | 2001 | 0 | 3 |
| 600 | 2002 | 2 | 6 |
| 600 | 2003 | 3 | 5 |
| Data | UniqueID | Begin | End | Item ID | Output Table |
| Observation1 | 555 | 0 | 1 | 1001 |
| 555 | 1 | 3 | 1001; 1002 |
| 555 | 3 | 4 | 1001; 1002; 1004 |
| 555 | 4 | 5 | 1001; 1002; 1003; 1004 |
| 555 | 5 | 7 | 1002 |
| Observation2 | 600 | 0 | 2 | 2001; 2002 |
| 600 | 2 | 3 | 2001; 2002 |
| 600 | 3 | 5 | 2002; 2003 |
| 600 | 5 | 6 | 2003 |
Is there a way to differentiate between records that are within a certain range(with UniqueID) as shown in the table above, plus have other fields for that range (with same uniqueID) in the output table?
I am really grateful for your help thus far guys, Thanks.