Hi, desperately and urgently need help on this.
I have a problem. I want to be able to find if a date range is within a date range of table and join it.
Table 1
| ID | Start Date | End Date | Period | Price 1 |
| 19 | 4/1/2020 | 4/30/2020 | 1 | 0.141582 |
| 19 | 5/1/2020 | 5/31/2020 | 1 | 0.14152 |
| 19 | 6/1/2020 | 6/30/2020 | 1 | 0.11553 |
| 19 | 7/1/2020 | 7/31/2020 | 1 | 0.10913 |
| 19 | 8/1/2020 | 8/31/2020 | 1 | 0.1013 |
| 19 | 9/1/2020 | 9/30/2020 | 1 | 0.10542 |
| 19 | 10/1/2020 | 6/30/2022 | 1 | 0.1013 |
Table 2
| ID | Start Date | End Date | Period | % A | % B | % C |
| 19 | 7/1/2020 | 6/30/2022 | 1 | 0.7 | 0.3 | [Null] |
If the date ranges in Table 1 is within the date range in Table 2, then assign the values of % A etc to Table 1
It should look like that
| ID | Start Date | End Date | Period | % A | % B | % C | Price 1 |
| 19 | 4/1/2020 | 4/30/2020 | 1 | [Null] | [Null] | [Null] | 0.141582 |
| 19 | 5/1/2020 | 5/31/2020 | 1 | [Null] | [Null] | [Null] | 0.14152 |
| 19 | 6/1/2020 | 6/30/2020 | 1 | [Null] | [Null] | [Null] | 0.11553 |
| 19 | 7/1/2020 | 7/31/2020 | 1 | 0.7 | 0.3 | [Null] | 0.10913 |
| 19 | 8/1/2020 | 8/31/2020 | 1 | 0.7 | 0.3 | [Null] | 0.1013 |
| 19 | 9/1/2020 | 9/30/2020 | 1 | 0.7 | 0.3 | [Null] | 0.10542 |
| 19 | 10/1/2020 | 6/30/2022 | 1 | 0.7 | 0.3 | [Null] | 0.1013 |
Really need this to work. Advanced thanks!