Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2008
    Posts
    42

    Unanswered: Conditional Expression

    Good afternoon!

    I am using Access 2003 and I am kind of stuck on how I should approach a situation.

    I am working with employee schedules and I have a start time for each day of the week the employee works. I need to break out the schedules by start hour (it seems simple enough) but I get hung up when there are different start times on different days.

    For example, Johny works 9-5 on mon, 10-6 on tues, 12-8 on wed, and 12-8 on thurs. For this example, i would want to count johny's weekly schedule as 12-8 for all days of the days. I am trying to create something that identifies the start time that occurs most often during the week for a given employee. I am not sure where to start.

    Any help would be appreciated.

    Thanks
    Drew

  2. #2
    Join Date
    Nov 2008
    Posts
    42
    ok, so I have gotten to a situation which is more managable for me to explain.

    I have a schedule id, number of days scheduled for each start hour, and a schedule start hour.

    I need to retrieve each schedule id with the start hour that has the max number of days scheduled. I tried using the max function with no success.

    I am even going about this in the right way?

    THanks
    Drew

  3. #3
    Join Date
    May 2005
    Posts
    1,191
    I'm not quite sure how you're intending to use this information or where it goes, but if I understand correctly, I would be looking at using a SELECT query with the Count() function, along with a TOP clause. Hope that gives you a good start.
    Me.Geek = True

Posting Permissions

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