Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2009-04-07
2
Medium Priority
?
401 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 2000 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Instead of error trapping or hard-coding for non-updateable fields when using QODBC, let VBA automatically disable them when forms open. This way, users can view but not change the data. Part 1 explained how to use schema tables to do this. Part 2 h…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

609 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