Skip to main content
Announcements
NEW Customer Portal: Initial launch will improve how you submit Support Cases. FIND OUT MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Aldemarprins4
Contributor III
Contributor III

Create Pairs

Hi everyone,
i have the following problem.

I would like to make pairs of the following form:

 

Arrival Stage Departure
02/11/2021 13:31:27 1. Process 02/11/2021 14:11:38
02/11/2021 14:12:02 1. Process 02/11/2021 14:12:03
02/11/2021 14:18:27 2 Distribucion 02/11/2021 14:18:28
02/11/2021 14:50:42 1. Process 02/11/2021 15:03:51
02/11/2021 15:10:41 2 Distribucion 02/11/2021 15:10:42
     

 

pairs  should be as follows:

Pair Arrival Stage Departure
1 02/11/2021 13:31:27 1. Process 02/11/2021 14:11:38
1 02/11/2021 14:12:02 1. Process 02/11/2021 14:12:03
1 02/11/2021 14:18:27 2 Distribucion 02/11/2021 14:18:28
2 02/11/2021 14:50:42 1. Process 02/11/2021 15:03:51
2 02/11/2021 15:10:41 2 Distribucion 02/11/2021 15:10:42
       

 

 Every time find a stage 2 Distribution before stage 1. Process a pair must be made

 

Thank you

1 Reply
anat
Master
Master

alt(peek(pair),1)-(stage='1.process' and peek(stage)='2 distribution) as pair

Community Browser