Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Peony
Creator III
Creator III

Values in the data range

Hi everyone.

I have 2 tables like these:

Activation_Info:
Load * Inline [
TypeNum, ActivationTime
123,	 10:20
123,	 18:46
124,	 10:30
125,	 10:15
125,	 18:40
126,	 22:49
127,	 14:01
128,	 15:00
129,	 2:10
129,	 13:30
];

SubGroup_Catalogue:
Load * Inline [
TypeNum, SubNum, From,	To
123,	 567,	 0:01,	10:25
123,	 568,	 10:25,	19:58
123,	 569,	 19:58,	23:20
126,	 567,	 7:00,	11:30
126,	 568,	 11:30,	18:15
126,	 569,	 18:15,	23:59
129,	 112,	 1:14,	12:25
129,	 568,	 12:25,	17:40
];


And from this data I want to create a third table that will contain all data from the Activation_Info table and correspondence SubNum values from the SubGroup_Catalogue table. 
Calculation for SubNum should be based on compare if ActivationTime for particular TypeNum is layed in the Time range that stetted in the SubGroup_Catalogue table. 

Expected result is described below

Final_table:
Load * Inline [
TypeNum, ActivationTime, SubNum
123,	 10:20,	         567
123,	 18:46,			 568
124,	 10:30,			 Null
125,	 10:15,			 Null
125,	 18:40,			 Null
126,	 22:49,			 569
127,	 14:01,			 Null
128,	 15:00,			 Null
129,	 2:10,			 112
129,	 13:30,			 568
];

 And now I have no idea from where should I start to solve this task? I will be very appreciate for your help and advises to find a solution.

Labels (1)
1 Solution
3 Replies
Peony
Creator III
Creator III
Author

Tried this function already, but got unexpected result and don't understood what to do else. 
All ActivationTime from different values now exist for each TypeNum.

 

  123.PNG

Peony
Creator III
Creator III
Author

Don't mind on my previous answer, I find the reason of the issue. ))))

And thank you for the link.