Assume the following:
(Disregard the bad sql syntax in "create table" segments, I'm simplifying the message for better understanding)
Create table Event_Participants (
Event_Name, text
Event_Participant, text
Event_Participant_Arrival, date/time
Event_Participant_Leaving date/time
)
There is no PK, only an index on Event_Name and Event_Participant to make sure no Participant can be logged more than once for one Event.
Assume, also
Create table Events (
Event_Name, text
Event_Start_Time, date/time
Event_End_Time, date/time
)
Again, no PK: Only Event_Name is a unique index
date1=[Query to get a participant particular arrival time for Event1]
date2=[Query to get Event1's particular Start_Time] (As you might've noticed, date2 is singular)
I want to run an update query and change some data with it, based on multiple conditions, wherein I only got stuck on the following
where DateDiff("n",date1,date2)<0
(This particular condition should check if anyone is late).
What I'm stuck with, is, how to do this date/time differential in minutes for all participants?
I can make it work when date1 is a single row, but on multiple, it says the "can fetch maximum one row" or something of the sort.