Solved

How do I delete duplicate rows in and access 2007 query using SQL?

Posted on 2009-04-07
2
395 Views
Last Modified: 2012-05-06
I have a query that is pulling from multiple tables.  I have some duplicate records on the VENDMAST1 table which is the AVVEND field.  With the query code I have now what woudl I have to change so that i dont get dupicate records from that field.  Thanks
SELECT BRENT_IVITMSP.ITITNM, BRENT_IVITMSP.ITITDS, BRENT_IVITMSP.ITORUM, BRENT_IVITMSP.ITSTLC, BRENT_IVITMSP.[ITVMF#], BRENT_VENDMAST1.AVNAME
FROM BRENT_IVITMSP INNER JOIN BRENT_VENDMAST1 ON BRENT_IVITMSP.[ITVND#] = BRENT_VENDMAST1.AVVEND
WHERE (((BRENT_IVITMSP.Itrecd)<>'D') AND ((BRENT_IVITMSP.ITSTCK)='Y'));

Open in new window

0
Comment
Question by:TriCountyIT
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 77

Accepted Solution

by:
peter57r earned 500 total points
ID: 24087489
Just add the word Distinct after Select
0
 

Author Comment

by:TriCountyIT
ID: 24087588
That was easy.  Thanks a lot
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question