Compare Previous Record

mous

Registered User.
Local time
Today, 14:57
Joined
Sep 26, 2001
Messages
109
Compare Previous Record (MS2000)

Here goes ....

I have a register table that contains:

COURSE CODE - ROOM - TUTOR - DAY - START TIME - END TIME
One - 202 - Somebody - Tue - 09:00 - 10:00
One - 202 - Somebody - Tue - 10:15 - 12:00
One - 202 - Somebody - Tue - 13:00 - 15:00

This is what I would like to do.

Check each next record with the previous. If the start time of the current record minus the end time of the previous record is less than 30 minutes then these two register records must be merged somehow. If 30 minutes or greater then record should remain.

So in the example above, it would now read:

One - 202 - Somebody - Tue - 09:00 - 12:00
One - 202 - Somebody - Tue - 13:00 - 15:00

I say merged, but when printing these registers, I want the details to be printed as above but the original table to remain and when the table is printed a Y placed in a field within the above original table. But a register will only be printed for one in the original table, I don't care which.

Thanks
 
I would like more information. Is the course list a list that a student chooses from an existing list? If so, It would be wiser to check for the sheduled times on insert of each record for that individual and error out if it meets your criteria. This will elimminate the need for checking the previous records as it won't get into the db in the first place.
 
Not possible. These records must contain this information in the first place fo all sorts of other reasons.

Thanks Anyway.
 

Users who are viewing this thread

Back
Top Bottom