Thread: Calculations on multiple tables
12-10-07, 17:38 #1Registered User
- Join Date
- Dec 2007
Unanswered: Calculations on multiple tables
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.
12-10-07, 18:04 #2Registered User
Provided Answers: 1You can lead some folks to knowledge, but you can not make them think.
- Join Date
- Aug 2003
- Where the Surf Meets the Turf @Del Mar, CA
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.