Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2006
    Posts
    2

    Unanswered: i need a query for my scenario

    hii

    My application is to calculate the resource uttilisation hours
    i have username,starttime and endtime field in my Data base i need to calculate the total utilisation hrs based on start time and end time by a particular user My database is Ms acess

    plz help me in this regard
    thank u in advance

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    what have you tried so far?
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Apr 2006
    Posts
    2

    query

    i tried it with

    select sum(endtime)-sum(strtime) from schedule where uid=username

    but its not the correct move for this calculation
    plz help me

  4. #4
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    you need to calcualte the duartion of each resource utuilisation
    you also ned to put in place some rules as to how you handle items whoch are not booked back in, before they are booked out again
    you alsoe need to decide how you handle possible duplaite bookings

    select sum(endtime)-sum(strtime) from schedule where uid=username
    i'd expcet something similar to
    select sum(endtime-strtime) from schedule

    i'd expcet to see some form of grouping GROUP BY clause
    i'd expect to see some filtration of results (ie where there is no return date) using a HAVING clause
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

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