Query from 3 other Queries

G

Guest

Ok I am trying to generate a query using 3 other queries. I'm having success
so far except for 1 problem. The "Briquetting Rate Query" looks fine on its
own, however when I combine it with the other 2 queries into a whole new one,
it seems to OCCASIONALLY duplicate the record from "Briquetting" twice. I
can't figure out why because the data looks fine if I looked at the
Briquetting Rate Query by itself. I have a feeling it's got something to do
with the relationships. The "Sorting Rates Quey" being used is one where
there should always be values coming from, and the column "UR Lot" is what
ties them all together. I've pasted the SQL Code below:

SELECT [Sorting Rate Query].[UR Lot], [Sorting Rate Query].[Start Date],
[Sorting Rate Query].Supplier, [Sorting Rate Query].Alloy, [Sorting Rate
Query].[Starting Weight], [Sorting Rate Query].Expr1, [Sorting Rate
Query].[Sorting Standard Rate], [Sorting Rate Query].expr2, [Sorting Rate
Query].expr3, [Degreasing Rate Query].[Start Date], [Degreasing Rate
Query].Alloy, [Degreasing Rate Query].[Starting Weight], [Degreasing Rate
Query].Expr1, [Degreasing Rate Query].[Degreasing Standard Rate], [Degreasing
Rate Query].Expr2, [Degreasing Rate Query].Expr3, [Briquetting Rate
Query].[Start Date], [Briquetting Rate Query].Alloy, [Briquetting Rate
Query].[Starting Weight], [Briquetting Rate Query].Expr1, [Briquetting Rate
Query].[Briquetting Standard Rate], [Briquetting Rate Query].Expr2,
[Briquetting Rate Query].Expr3
FROM ([Sorting Rate Query] LEFT JOIN [Degreasing Rate Query] ON ([Sorting
Rate Query].[UR Lot]=[Degreasing Rate Query].[UR Lot]) AND ([Sorting Rate
Query].Supplier=[Degreasing Rate Query].Supplier)) LEFT JOIN [Briquetting
Rate Query] ON ([Sorting Rate Query].[UR Lot]=[Briquetting Rate Query].[UR
Lot]) AND ([Sorting Rate Query].Supplier=[Briquetting Rate Query].Supplier)
WHERE ((([Sorting Rate Query].[Start Date])>#5/1/2005#) AND (([Sorting Rate
Query].Supplier)="Dominion"))
ORDER BY [Sorting Rate Query].[UR Lot];
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top