A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Determining an overlap in time between lines



 
 
Thread Tools Display Modes
  #1  
Old August 11th, 2009, 04:46 PM posted to microsoft.public.access.gettingstarted
Clueless
external usenet poster
 
Posts: 76
Default Determining an overlap in time between lines

Hi,
I am trying to determine if there is an overlap in time between tasks of
multiple employees. It does not make a difference if it is 2 different
employees or 2 different tasks, I am only interested if the end time overlaps
with the start time. For example:

Employee Task StartTime EndTime
1. Joe Receiving 01:00 01:41
2. Bob Loading 01:10 01:20
3. Sue Shipping 01:20 01:28

Line 1 and Line 2 - end time of line 1 overlaps with start time of line 2.
Is there a way of flagging this in my report? Thanks for your help.
--
clueless
  #2  
Old August 11th, 2009, 05:15 PM posted to microsoft.public.access.gettingstarted
John Spencer
external usenet poster
 
Posts: 7,815
Default Determining an overlap in time between lines

SELECT Employee, Task, StartTime, EndTime
, Exists (SELECT * FROM SomeTable As Temp
WHERE Temp.StartTime SomeTable.StartTime
AND Temp.StartTime SomeTable.EndTime)
FROM SomeTable

That should return TRUE for line 2. If you want true for both line 1 and 2
then the criteria becomes more complex.

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County

clueless wrote:
Hi,
I am trying to determine if there is an overlap in time between tasks of
multiple employees. It does not make a difference if it is 2 different
employees or 2 different tasks, I am only interested if the end time overlaps
with the start time. For example:

Employee Task StartTime EndTime
1. Joe Receiving 01:00 01:41
2. Bob Loading 01:10 01:20
3. Sue Shipping 01:20 01:28

Line 1 and Line 2 - end time of line 1 overlaps with start time of line 2.
Is there a way of flagging this in my report? Thanks for your help.

  #3  
Old August 11th, 2009, 06:30 PM posted to microsoft.public.access.gettingstarted
Clueless
external usenet poster
 
Posts: 76
Default Determining an overlap in time between lines

Thank You!!!! Perfect! Have a great day.
--
clueless


"John Spencer" wrote:

SELECT Employee, Task, StartTime, EndTime
, Exists (SELECT * FROM SomeTable As Temp
WHERE Temp.StartTime SomeTable.StartTime
AND Temp.StartTime SomeTable.EndTime)
FROM SomeTable

That should return TRUE for line 2. If you want true for both line 1 and 2
then the criteria becomes more complex.

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County

clueless wrote:
Hi,
I am trying to determine if there is an overlap in time between tasks of
multiple employees. It does not make a difference if it is 2 different
employees or 2 different tasks, I am only interested if the end time overlaps
with the start time. For example:

Employee Task StartTime EndTime
1. Joe Receiving 01:00 01:41
2. Bob Loading 01:10 01:20
3. Sue Shipping 01:20 01:28

Line 1 and Line 2 - end time of line 1 overlaps with start time of line 2.
Is there a way of flagging this in my report? Thanks for your help.


  #4  
Old August 11th, 2009, 10:39 PM posted to microsoft.public.access.gettingstarted
Clueless
external usenet poster
 
Posts: 76
Default Determining an overlap in time between lines

Hi John,
Sorry to bother you but I just notice something on my report. I have it
showing "yes" if it overlaps and out of 74, 1 should and does not.

Employee Task StartTime EndTime Overlap
1. X Loading 16:10 16:30 Yes
2. A Receiving 16:14 16:30
3. F Shipping 16:30 16:40
4. J Picking 16:30 16:50
5. P Loading 16:50 17:25

Line 3 should show "yes" but it doesn't. Any suggestions on how to correct
this.
Thanks again for all your help,
--
clueless


"John Spencer" wrote:

SELECT Employee, Task, StartTime, EndTime
, Exists (SELECT * FROM SomeTable As Temp
WHERE Temp.StartTime SomeTable.StartTime
AND Temp.StartTime SomeTable.EndTime)
FROM SomeTable

That should return TRUE for line 2. If you want true for both line 1 and 2
then the criteria becomes more complex.

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County

clueless wrote:
Hi,
I am trying to determine if there is an overlap in time between tasks of
multiple employees. It does not make a difference if it is 2 different
employees or 2 different tasks, I am only interested if the end time overlaps
with the start time. For example:

Employee Task StartTime EndTime
1. Joe Receiving 01:00 01:41
2. Bob Loading 01:10 01:20
3. Sue Shipping 01:20 01:28

Line 1 and Line 2 - end time of line 1 overlaps with start time of line 2.
Is there a way of flagging this in my report? Thanks for your help.


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 06:43 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.