mtagliaferri
Registered User.
- Local time
- Today, 20:26
- Joined
- Jul 16, 2006
- Messages
- 550
here I am again having problems grouping data....
I need to group the following qry, grouping together all data with same value in TBLTRIP with record source PSR I have the joint table TBLFLIGHT where I have add all values FLIGHTTIME which is a time format.
Can I get any help?
Thanks
I need to group the following qry, grouping together all data with same value in TBLTRIP with record source PSR I have the joint table TBLFLIGHT where I have add all values FLIGHTTIME which is a time format.
Can I get any help?
Thanks
Code:
SELECT tblTrip.PSR, Count(tblTrip.NDays) AS [Tot Of Trips], Sum(tblTrip.NDays) AS [Tot Of Days], Sum(tblTrip.NNightStop) AS [Night Stops], Int(Sum(tblTrip.FlyingTime)*24) & ":" & Format(Sum(tblTrip.FlyingTime),"nn") AS [Tot Flying Time], Sum(tblTrip.TAFB) AS [Tot TAFB], tblTrip.DutyPayRate, Sum([TAFB]*[DutyPayRate]) AS [Tot Duty Pay], tblFlight.FlightTime
FROM tblTrip INNER JOIN tblFlight ON tblTrip.IDTrip = tblFlight.IDTrip
GROUP BY tblTrip.PSR, tblTrip.DutyPayRate, tblFlight.FlightTime;