Here is the query after the VB6 datareport has modified it to be 'correct'...it puts load. DATE (load.<space> DATE)
The only way I have been able to get around this is to use Load.* but then I run into an error with an aggregate function. If I take the spaces out between Load. and DATE and put the query into Access, it runs fine...any help would be greately appreciated. Email me at burn69@shaw.ca
Thanks.
SELECT load. DATE, load.waybillnum, route.start, route.end,
load.hrlyhauls, load.correctedvolume, load.addwork,
route.riser, load.comments, driver.fname, driver.lname,
load.wage, load.driverindex,
(SELECT unit
FROM equipment
WHERE load.truckkey = equipment.equipkey) AS TruckUnit,
(SELECT unit
FROM equipment
WHERE load.Trailer1Key = equipment.equipkey)
AS TrailerUnit1,
(SELECT unit
FROM equipment
WHERE load.Trailer2Key = equipment.equipkey)
AS TrailerUnit2, route.rate, (route.rate * load.correctedvolume)
AS RatedTotal, load.hourlyrate,
(load.hourlyrate * load.addwork * load.hrlyhauls)
AS HourlyTotal, (HourlyTotal + RatedTotal) AS HaulTotal
FROM Route INNER JOIN
(Driver INNER JOIN
Load ON Driver.DriverKey = Load.DriverIndex) ON
Route.RouteKey = Load.RouteIndex
ORDER BY load. DATE
The only way I have been able to get around this is to use Load.* but then I run into an error with an aggregate function. If I take the spaces out between Load. and DATE and put the query into Access, it runs fine...any help would be greately appreciated. Email me at burn69@shaw.ca
Thanks.
SELECT load. DATE, load.waybillnum, route.start, route.end,
load.hrlyhauls, load.correctedvolume, load.addwork,
route.riser, load.comments, driver.fname, driver.lname,
load.wage, load.driverindex,
(SELECT unit
FROM equipment
WHERE load.truckkey = equipment.equipkey) AS TruckUnit,
(SELECT unit
FROM equipment
WHERE load.Trailer1Key = equipment.equipkey)
AS TrailerUnit1,
(SELECT unit
FROM equipment
WHERE load.Trailer2Key = equipment.equipkey)
AS TrailerUnit2, route.rate, (route.rate * load.correctedvolume)
AS RatedTotal, load.hourlyrate,
(load.hourlyrate * load.addwork * load.hrlyhauls)
AS HourlyTotal, (HourlyTotal + RatedTotal) AS HaulTotal
FROM Route INNER JOIN
(Driver INNER JOIN
Load ON Driver.DriverKey = Load.DriverIndex) ON
Route.RouteKey = Load.RouteIndex
ORDER BY load. DATE