Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello guys
I'm trying to find solution with intervalmatch but I think I'm missing something...
I have 2 tables:
| ClientsByDates | |
| Month | ClientKey |
| 02-2013 | 100 |
| 03-2013 | 100 |
| 04-2013 | 100 |
| 02-2013 | 101 |
| 03-2013 | 101 |
| 04-2013 | 101 |
| 02-2013 | 102 |
| 03-2013 | 102 |
| 04-2013 | 102 |
| ClientsLevelels | |||
| FromMonth | ToMonth | ClientKey | Level |
| 02-2013 | 03-2013 | 100 | 1 |
| 04-2013 | 07-2013 | 100 | 4 |
| 02-2013 | 03-2013 | 99 | 1 |
| 04-2013 | 07-2013 | 99 | 2 |
As a result I want to get the Client Level from second table in the first one by month:
| ClientsByDates | ||
| Month | ClientKey | Level |
| 02-2013 | 100 | 1 |
| 03-2013 | 100 | 1 |
| 04-2013 | 100 | 4 |
| 02-2013 | 101 | - |
| 03-2013 | 101 | - |
| 04-2013 | 101 | - |
| 02-2013 | 102 | - |
| 03-2013 | 102 | - |
| 04-2013 | 102 | - |
| 99 | 2 | |
| 99 | 1 | |
Thanks in advance for your help
Thanks
I decided not to present client99 (thanks to you) and your solution works great