A field that checks whether date belongs to any of the specified date periods
Here's what I need to achieve. I'm having 2 different tables - one containing fields Name and Date and another also containing Name and Range_From and Range_To.
Essentially, I have a table showing a person's name and date showing when they have bought fuel. The other table is showing person's name and date from and date till if they have had absence. It is needed to check if they have bought fuel during their absence.
I already found a solution that does this if there is only one row of absence for each Name. However, there might be multiple rows of absence. In that case my solution only takes the first one.
How would I go about checking whether any of the dates from the first table match any of the intervals in the second table?
Maybe it is possible to achieve this with IntervalMatch()?