I have
items ---- supporders ---- suppincoming
===== ========== ============
ItemID OrderID OrderID
ItemID IncQty
OrderQty
SODate
and
items ---- orderrows ---- orders
===== ========= ======
ItemID ItemID OrderID
OrderID OrderDate
ORQty
and want to sum ORQty, OrderQty and IncQty per item.
If I join all tables, the two “branches” from item produce a kind of cross-join and the amount goes up the roof.
Subqueries gives correct values, but awfully slow.
EDIT:
Please see link for MS-access runnable example.
Any better way?
regards,
/t
It seems the query can’t be issued without subqueries, and obviously, MS-access with linked tables to sql-server (firebird) is a performance-pig.
Executing a parameterized pass-through query from Access solves the performance issues.
thanks
/t