Hi All,
I have a Pass Through Query called "qryDrivera2", the SQL is this:
SELECT tblLocal.LoadLineID, tblLocal.Suburb, tblContract.Contract, tblLocal.Yard, tblLocal.BrickType, tblLocal.Qty, tblLocal.DeliveryDate, tblLocal.Plant, tblLocal.SpecialReq, tblLocal.TruckType, tblLocal.AreaKlm, tblLocal.Pallets, tblContract.ContractID, tblLocal.LoadBoxNo, tblLocal.DriverNo, tblLocal.Basket, tblLocal.JDNo, tblLocal.Driver, tblLocal.LoadBoxNo, tblLocal.Allocated, tblLocal.Abbrev, tblLocal.Confirmed, tblLocal.ConfirmedLoad, Case when [tblLocal].[Abbrev] Is Null then [Plant] else [tblLocal].[Abbrev] end AS Abbrev2, tblContract.Abbrev, tblLocal.DeliverySlot, tblLocal.Builder, tblLocal.MinQty, tblLocal.TruckNo
FROM tblLocal INNER JOIN tblContract ON tblLocal.ContractID = tblContract.ContractID
WHERE tblLocal.LoadBoxNo = 1
I am trying to sum the fields Qty & Pallets from this query in another Pass Through Query called qryDrivera2SUM, this SQL is this:
SELECT Sum(qryDrivera2.Qty) AS SumOfQty, Sum(qryDrivera2.Pallets) AS SumOfPallets
FROM qryDrivera2;
When i attempt to run qryDrivera2SUM, i keep getting the following error:
ODBC -call failed
[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name 'qryDrivera2'. (#208)
Can anyone see what i'm doing wrong in qryDrivera2SUM?
I've been pulling my hair out with this one!!![]()