duplicate records

P

patti

I am getting duplicates in this query:

SELECT [Todays's Acast].Date, [Todays's Acast].[On Order], [Todays's
Acast].[DMD $], [Yesterdays's Acast].[DMD $], [Todays's Acast].Demand,
[Todays's Acast].[On Hand], [Item Proof].Cat, [Category Table].div, [Category
Table].[sub div], [Category Table].Season, [Category Table].class,
[Description Table].Style, [Todays's Acast].Status, [Description
Table].[Short Description], [Offer Comparison].[Current Retail], [Item
Proof].[Orig Retail], [Yesterdays's Acast].Demand, [Yesterdays's Acast].[On
Hand], [Yesterdays's Acast].[On Order], [Yesterdays's Acast].Date, [Category
Table].[Season 2] INTO [check on duplicates]
FROM (((([Item Proof] LEFT JOIN [Description Table] ON [Item Proof].Style =
[Description Table].[Long Style]) LEFT JOIN [Yesterdays's Acast] ON [Item
Proof].Style = [Yesterdays's Acast].Style) LEFT JOIN [Category Table] ON
[Item Proof].Cat = [Category Table].Cat) LEFT JOIN [Offer Comparison] ON
[Item Proof].Style = [Offer Comparison].[Long Style]) INNER JOIN [Todays's
Acast] ON [Item Proof].Style = [Todays's Acast].Style;

Yesterdays's Acast is just Todays's Acast aged, so fields are same. I think
that is where the duplicates are cominf from but am at a loss on how to stop
duplicates.

Any ideas?

Thanks,

patti
 
J

Jeanette Cunningham

Hi Patti,
often duplicates can be removed by using the DISTINCT or DISTINCTROW
keywords.
Try
SELECT DISTINCT [Todays's Acast].Date, [Todays's Acast].[On Order], . .
.. .
if that doesn't help, try
SELECT DISTINCTROW [Todays's Acast].Date, [Todays's Acast].[On Order], .
.. . .

Jeanette Cunningham
 
B

Biz Enhancer

Try putting a GROUP BY clause in your query.
In Query Design view, right click on the design grid and select "totals"

Regards,

Nick.
 

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