1 Reply Latest reply: Apr 6, 2017 12:44 AM by dineshraj ramesh RSS

    IntervalMatch and synthetic key

    Haikuo Yu

      How to deal with synthetic key when using IntervalMatch?

      Thanks!

       

      IntervalMatch (matchfield,keyfield1 [ , keyfield2, ... keyfield5 ] ) (loadstatement | selectstatement )


      EventLog:

      LOAD * Inline [

      Time, Event, Comment, ProductionLine

      00:00, 0, Start of shift 1, P1

      01:00, 0, Start of shift 1, P2

      01:18, 1, Line stop, P1

      02:23, 2, Line restart 50%, P1

      04:15, 3, Line speed 100%, P1

      08:00, 4, Start of shift 2, P1

      09:00, 4, Start of shift 2, P2

      11:43, 5, End of production, P1

      11:43, 5, End of production, P2

      ];

       

      OrderLog:

      LOAD * INLINE [

      Start, End, Order, ProductionLine

      01:00, 03:35, A, P1

      02:30, 07:58, B, P1

      03:04, 10:27, C, P1

      07:23, 11:43, D, P2

      ];

       

      //Link the field Time to the time intervals defined by the fields Start and End and match the values

      // to the key ProductionLine.

      Inner Join

      IntervalMatch ( Time, ProductionLine )

      LOAD Start, End, ProductionLine

      Resident OrderLog;