Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2007

    Unanswered: Calculations on multiple tables

    Hi All.

    I was hoping somebody might help with some calculations I'm trying to realise.
    I'm trying to retrieve information based on three tables and then calculate the difference between 2 dates; and then calculating that by a hire rate.

    Select O.OrderNo, VO.Hire_Start_Time, VO.Hire_End_Time, V.Vehicle_No, V.Hire_Rate, VO.Hire_End_Time - VO.Hire_Start_Time * V.Hire_Rate
    From Order O, Vehicles_Ordered VO, Vehicles V
    Where O.Order_No = VO.Order_No
    And V.Vehicle_No = VO.Vehicle_No
    And O.Order_No = 3

    I can't seem to make it work. Im not sure If it's because I've made an error with my joins, or because I've made a mistake with the final select statement.
    Any help would be much appreciated.

  2. #2
    Join Date
    Aug 2003
    Where the Surf Meets the Turf @Del Mar, CA
    Provided Answers: 1
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

Posting Permissions

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