C
Chris
I'm trying to build a database to track quotes made on projects, following
the layout shown in the MS Northwind Database. But the form based on the
following query is very slow to open when there is only 12 records in the
Quote Details table. The Quote Details table is made unique by having
primary keys for four fields QuoteID, ProductID, BldgID and Floor all of
which allow duplicates.
The table structure is as follows
Projects - Prmiay Key ProjectID
Products - Primary Key ProductID
Quote - Primary Key QuoteID
Building - Primary Key BldgID, other fiedls are BldgDescrp
QuoteDetail - Primay Key QuoteID, Secondary Keys ProductID, BldgID and Floor
There are one to many relationships made between the relevant tables.
SELECT QuoteDetails.QuoteID, QuoteDetails.ProductID, QuoteDetails.BldgID,
QuoteDetails.Floor, AtlasProducts.ProductNo, QuoteDetails.FixedCost,
QuoteDetails.UnitPrice, QuoteDetails.Quantity, QuoteDetails.MarkUp,
CCur([QuoteDetails].[UnitPrice]*[Quantity]*(1+[MarkUp])+[QuoteDetails].[Fixe
dCost]) AS ExtendedPrice, ProjectQuotes.ProjectID, Building.BldgDescrp
FROM ProjectQuotes INNER JOIN (AtlasProducts INNER JOIN (Building RIGHT JOIN
QuoteDetails ON Building.BldgID = QuoteDetails.BldgID) ON
AtlasProducts.ProductID = QuoteDetails.ProductID) ON ProjectQuotes.QuoteID =
QuoteDetails.QuoteID;
Obviously I have made things to complicated and hope someone can have a
suggestion on how to improve on the speed or troubleshoot the tables or
query to make it run faster.
Thanks for any help
Chris
the layout shown in the MS Northwind Database. But the form based on the
following query is very slow to open when there is only 12 records in the
Quote Details table. The Quote Details table is made unique by having
primary keys for four fields QuoteID, ProductID, BldgID and Floor all of
which allow duplicates.
The table structure is as follows
Projects - Prmiay Key ProjectID
Products - Primary Key ProductID
Quote - Primary Key QuoteID
Building - Primary Key BldgID, other fiedls are BldgDescrp
QuoteDetail - Primay Key QuoteID, Secondary Keys ProductID, BldgID and Floor
There are one to many relationships made between the relevant tables.
SELECT QuoteDetails.QuoteID, QuoteDetails.ProductID, QuoteDetails.BldgID,
QuoteDetails.Floor, AtlasProducts.ProductNo, QuoteDetails.FixedCost,
QuoteDetails.UnitPrice, QuoteDetails.Quantity, QuoteDetails.MarkUp,
CCur([QuoteDetails].[UnitPrice]*[Quantity]*(1+[MarkUp])+[QuoteDetails].[Fixe
dCost]) AS ExtendedPrice, ProjectQuotes.ProjectID, Building.BldgDescrp
FROM ProjectQuotes INNER JOIN (AtlasProducts INNER JOIN (Building RIGHT JOIN
QuoteDetails ON Building.BldgID = QuoteDetails.BldgID) ON
AtlasProducts.ProductID = QuoteDetails.ProductID) ON ProjectQuotes.QuoteID =
QuoteDetails.QuoteID;
Obviously I have made things to complicated and hope someone can have a
suggestion on how to improve on the speed or troubleshoot the tables or
query to make it run faster.
Thanks for any help
Chris