Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DataReport keeps putting space between table.name !?!?

Status
Not open for further replies.

crownit

IS-IT--Management
Mar 8, 2004
29
CA
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
 
Date is a reserved word. You are likely to hit several problems by iusing reserved words as fieldnames in VB. You can try enclosing the field name in square brackets:
[tt]

SELECT load.[DATE], load.waybillnum .....
...
...
ORDER BY load.[DATE]
[/tt]

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'If we're supposed to work in Hex, why have we only got A fingers?'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top