Hi All
As an simple example, I have a number of suppliers who all supply products which may be a full or a subset of all products.
In order to find the cheapest possible method of supply - I am using a cartesian product (which works very well) but would like to explore other alternatives (for obvious reasons). Any ideas?
Example:
Query [12]:
SELECT ProductsSupplied.ProductID, ProductsSupplied.SupplierID, [price]+[mail cost] AS Pricez
FROM Suppliers INNER JOIN ProductsSupplied ON Suppliers.SupplierID = ProductsSupplied.SupplierID
WHERE (((ProductsSupplied.ProductID)=12));
ie - finds which suppliers supply a particular product and at what cost.
SELECT [12].pricez + [13].pricez + [14].pricez AS total, [13].SupplierID, [14].SupplierID, [12].SupplierID
FROM 13, 14, 12
Which lists all possible combination of prices - and hence easy to find the cheapest.
Any better methods?
Stew