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
Solved

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

Posted on 2009-04-07
2
394 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
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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

If you find yourself in this situation “I have used SELECT DISTINCT but I’m getting duplicates” then I'm sorry to say you are using the wrong SQL technique as it only does one thing which is: produces whole rows that are unique. If the results you a…
It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
Familiarize people with the process of utilizing SQL Server views 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 Access…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

809 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