Jump to content

Assign value from 1 table to other


Viktor Sudicky

Recommended Posts

HI All,

I'm working on a dahsborad where I have 2 sets of data. One contaning an activity with a start and end time and another with activity that has a time oc occurance.

Table 1:

 

 

 

Batch

Start

End

 

 

 

 

1

01 May 2021 08:00

01 May 2021 20:00

 

 

2

04 May 2021 09:30

05 May 2021 08:00

 

 

 

Table 2

 

 

 

Alarm

Time of occurance

 

 

 

 

A

01 May 2021 10:23

 

 

B

05 May 2021 05:00

 

 

 

 

I want to associate the batch number to each alarm if the time of alarm occurance happens between a start or end time of a batch. Also to note there can be no 2 batches running in paralell so there will never be a scenario where the batch times would overlap.

What I need the final table to look like is this:

 

 

 

Alarm

Time of occurance

Batch

 

 

 

 

A

01 May 2021 10:23

1

 

 

B

05 May 2021 05:00

2

 

 

 

 

Is there an easy way to match the date withouth a scrip If no is there a way to calculate the additional vatch column in the second(or the final table)

Thank you

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...