4 Replies Latest reply: Mar 7, 2017 2:31 PM by Andrew Moberg

# REDACTED

Disregard...updating question

• ###### Re: Interval Match on more than one key

There is In and Out and Start and End... How are we interval-matching them?

• ###### Re: Interval Match on more than one key

Rephrased the question...thanks

• ###### Re: Interval Match on more than one key

I believe an IF statement would work in your situation

If(In>=Start and Out <= Stop,'X') as Flag

Table:

Log,

Serv,

Date(Date,'DD/MM/YYYY') as Date,

Time(In,'hh:mm')  as In ,

Time(Out,'hh:mm') as Out;

[

Log,Serv,Date,In,Out

123,Ortho,2/1/2017, 7:20,12:45

345,Ortho,2/1/2017, 9:15,11:20

567,Ortho,2/1/2017, 12:15,16:18

789,Uro,2/1/2017, 11:15,13:46

];

Left join(Table)

Serv,

Date(Date,'DD/MM/YYYY') as Date,

Time(Start,'hh:mm')  as Start ,

Time(Stop,'hh:mm') as Stop;

[

Serv,Date,Start,Stop

Ortho,2/1/2017,7:20,15:00

Uro,2/2/2017,7:20,17:00

];

Where

Flag='X';

Log,

Serv,Date,

In,

Out,

Start,

Stop,

If(In>=Start and Out <= Stop,'X') as Flag

Resident Table;

Drop Table Table;

• ###### Re: Interval Match on more than one key

This does exactly what I asked, however I now realize I should rephrase the question as I need to see the number of minutes that occurred not the count of cases...thank you for helping