Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2011
    Posts
    13

    Unhappy Start and Stop times where condition true

    I need help with developing a query, or a VBA script to get start and stop times where a condition is met. I have a table called Temp_Table. Sample data:
    Code:
     
    ID-Terminal_ID-Time_Stamp--Dn---Up
    1----2----6/19/2011-00:01---1----1
    2----2----6/19/2011-00:02---1----1
    3----2----6/19/2011-00:03---1----1
    4----2----6/19/2011-00:04---0----0
    5----2----6/19/2011-00:05---0----0
    6----2----6/19/2011-00:06---1----1
    7----2----6/19/2011-00:07---1----1
    8----2----6/19/2011-00:08---0----0
    9----2----6/19/2011-00:09---1----1
    10---2----6/19/2011-00:10---1----1
    11---2----6/19/2011-00:11---1----1
    12---2----6/19/2011-00:12---0----0
    13---2----6/19/2011-00:13---0----0
    14---2----6/19/2011-00:14---0----0
    I need the start time where up and dn = 0 and the stop time where up and dn <> 0.
    The result should look like this:
    Code:
     
    Terminal_ID------Start----------Stop
    2-----------6/19/2011 00:04-6/19/2011 00:06
    2-----------6/19/2011 00:08-6/19/2011 00:09
    2-----------6/19/2011 00:12-Null
    and it needs to be efficient as it will be running on 100K records. I have a query that works but it uses corelated queries in the select statement and it takes way too long.



    I've been working on this for over a week now and I'm not getting anywhere. any help would be appreaciated.

  2. #2
    boblarson is offline --------
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2011
    Posts
    1,272
    See if this might be helpful:

    http://www.baldyweb.com/OverLap.htm

  3. #3
    Join Date
    Jan 2011
    Posts
    13
    Quote Originally Posted by boblarson View Post
    See if this might be helpful:

    http://www.baldyweb.com/OverLap.htm
    Unfortunately this does not help me. In the example they already have a start and stop date time.

    I have a list of time stamp and need to extract a start and stop time from the list.

  4. #4
    Join Date
    Jan 2011
    Posts
    13
    anybody got any suggestions?

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Yes/No True/False
    By DSTR3 in forum Access
    Replies: 5
    Last Post: 12-04-2010, 05:56 PM
  2. If any of the following are true
    By Steven.Allman in forum Queries
    Replies: 7
    Last Post: 08-30-2010, 06:10 AM
  3. Replies: 2
    Last Post: 11-29-2009, 12:00 PM
  4. True or false
    By tleec in forum Queries
    Replies: 1
    Last Post: 02-01-2008, 10:41 AM
  5. auto start/stop time
    By j0ker21m in forum Reports
    Replies: 1
    Last Post: 12-10-2005, 08:42 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums