Results 1 to 2 of 2

Thread: Earliest Time

  1. #1
    Join Date
    Jun 2008
    Location
    Leyland in NW England, UK
    Posts
    19

    Question Unanswered: Earliest Time

    I need to pull the row with the earliest date/time from a table which has numerous rows entered per Work Order Number e.g.

    Work Order_______CrDate____________Time

    7123456________02/11/2008___________10:09:45
    7123456________02/11/2008___________11:15:18
    7123456________02/11/2008___________14:23:52
    7123456________02/11/2008___________16:53:27
    7123456________03/11/2008___________09:36:31

    In this example it's the first row with date of 02/11/2008 and time of 10:09:45that I want to have showing in my report but at moment if I pull crdate it just picks a record at random.

    Cheers

    Sugsy

  2. #2
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    First thing you're going to have to do is combine the date and time to make a datetime value.
    Then you group by work order, showing only the one with the lowest (i.e. Min) datetime value.
    George
    Home | Blog

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •